list - 迁移时忽略列表项
问题描述
对不起,如果这个问题早先解决了。
我有一个简单的代码可以让事情变得容易理解
public class Treatment
{
public int Id { get; set; }
public List<string> Issue { get; set; }
public List<string> Medicine { get; set; }
public List<string> Test { get; set; }
public Doctor Doctor { get; set; }
public Patient Patient { get; set;
}
Add-Migrationa 和 Update-Database 之后
桌子的设计是这样的——
[dbo].[Treatments](
[Id] [int] IDENTITY(1,1) NOT NULL,
[Doctor_Id] [int] NULL ForeignKey,
[Patient_Id] [int] NULL ForeignKey
列出医学,测试等项目发生了什么。
顺便说一句,我正在研究 EF6。
解决方案
推荐阅读
- sql - presto 将单列值拆分为多行
- html - 如何使 iframe 元素的高度与按钮元素的高度相同?
- python - 图像处理 w。云解决方案
- r - 计算 R 中变量级别的组合
- python - 如何让 SQLAlchemy 识别 Postgres 中已经定义的自定义类型
- c# - 如何在 C# 中使用 KeyPress 事件按下 Alt 时显示消息?
- python - 断言 pandas 系列仅包含字符串
- flutter - 用于离线/在线网络套接字同步的 Flutter 设计模式
- node.js - npm-link 库上的无效挂钩调用
- java - 无法在仪器中打开 trace.zip 文件内容