When I add a new Controller
to my project using the MVC 5 Controller with views, using Entity Framework
option I'm having the error there was an error running the selected code generator
, depending on the image.
When I add a new Controller
to my project using the MVC 5 Controller with views, using Entity Framework
option I'm having the error there was an error running the selected code generator
, depending on the image.
In this question seems to be exactly the same problem you encountered.
The suggestion (which, according to the author of the question, worked for him too) was to add the following setting in OnModelCreating :
modelBuilder.Configurations.Add(new OrderConfiguration());
Before creating the Controller , make sure there is no line with something like this in the OnModelCreating
event:
modelBuilder.Configurations.Add(new UsuarioConfiguration());