4
可能重复:
Exclude a field/property from the database with Entity Framework 4 & Code-FirstEF代码首先排除列
我使用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; }
谢谢。
看到这个帖子:http://stackoverflow.com/questions/1707663/exclude-a-field-property - 从最数据库与实体框架-4-代码优先 – TGlatzer