Entity Framework Code First - How to ignore a column when saving
I have a class called Client mapped to a database table using Entity Framework code first. The table has a computed field that I need available in my Client class, but I understand that it won't be possible to write to this field. Is there a way of configuring Entity Framework to ignore the property when saving, but include the property when reading? I have tried using the Ignore method in my configuration class, or using the [NotMapped] attribute, but these prevent the property from being read from the database. You can use DatabaseGeneratedAttribute with DatabaseGeneratedOption.Computed