0
votes

I read http://blogs.msdn.com/b/efdesign/archive/2010/03/30/data-annotations-in-the-entity-framework-and-code-first.aspx

and there is mention of StoreIgnoreAttribute. I cannot find an implementation of this in EF6. So is there a data annotation to ignore a propery in a class from being mapped to a column in the table?

1

1 Answers

3
votes

You can use the NotMapped Annotation

public class Customer
{
    public string FirstName {get;set;}
    public string LastName {get;set;}
    [NotMapped]
    public string FullName { set; get; }
}