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