I am using the first EF code method in my project. I recently upgraded the EF version of my project to EF 6 using the package manager console.
All my objects inherit from the BaseEntity class as a superclass:
public abstract class BaseEntity { public virtual int Id { get; set; } States _state; [NotMapped] public States State { get; set;} public enum States { Unchanged, Added, Modified, Deleted } .... }
Nor do I add BaseEntity to my DbContext , the program runs without any problems, but since I added the pre-generated views to my project using the EF6 CodeFirst View Generation T4 Template for C # , when I create the views, there are no problems, but when I run my project, I got the following error:
The current model no longer matches the model used to pre-generate the mapping views, as indicated by the ViewsForBaseEntitySets786b989cf4a349108a38357765a23070.MappingHashValue property. Pre-created display views must be either regenerated using the current model, or deleted if display views generated at run time should be used instead. See http://go.microsoft.com/fwlink/?LinkId=318050 for more information on Entity Framework object representation views.
Does anyone know where the problem is? Or at least what way to find a problem?
c # entity-framework ef-code-first t4
Masoud
source share