【发布时间】:2012-09-25 08:02:08
【问题描述】:
可能重复:
Exclude a field/property from the database with Entity Framework 4 & Code-First
我使用的是 EF 4 代码优先。
有什么方法可以排除在数据库中创建列吗?
例如我想排除要创建的Zip 列。
public string Address { get; set; }
[StringLength(40)]
public string City { get; set; }
[StringLength(30)]
public string State { get; set; }
[StringLength(10)]
public string Zip { get; set; }
谢谢。
【问题讨论】:
标签: c# entity-framework ef-code-first