0
我读http://blogs.msdn.com/b/efdesign/archive/2010/03/30/data-annotations-in-the-entity-framework-and-code-first.aspxDataAnnotation忽略列?
并有StoreIgnoreAttribute提及。我无法在EF6中找到这个实现。那么是否有数据注释来忽略类中的propery被映射到表中的列?
我读http://blogs.msdn.com/b/efdesign/archive/2010/03/30/data-annotations-in-the-entity-framework-and-code-first.aspxDataAnnotation忽略列?
并有StoreIgnoreAttribute提及。我无法在EF6中找到这个实现。那么是否有数据注释来忽略类中的propery被映射到表中的列?
时,他们很容易可以使用NotMapped注释
public class Customer
{
public string FirstName {get;set;}
public string LastName {get;set;}
[NotMapped]
public string FullName { set; get; }
}
喜欢它。谢谢。 – TheEdge 2014-09-22 06:39:18