I want to persist some data on a database using Entity Framework.
I have some bigger POCOs but I want to store some of the properties only.
I know that I can a
You can mark individual properties as NotMapped within the class itself.
public class MyPoco
{
public int Id { get; set; }
[NotMapped]
public string Name { get; set; }
public int SomeSpecialId { get; set; }
}
Doesn't solve your issue of 'ignore everything but this' but might make it obvious what is and isn't included.