0
When adding a new Controller
in my project using the option MVC 5 Controller with views, using Entity Framework
I’m having the error there was an error running the selected code generator
, according to the image.
0
When adding a new Controller
in my project using the option MVC 5 Controller with views, using Entity Framework
I’m having the error there was an error running the selected code generator
, according to the image.
1
In that question seems to be exactly the same problem you found.
The suggestion (which, according to the author of the question, worked for him too) was to add the following setting to the Onmodelcreating:
modelBuilder.Configurations.Add(new OrderConfiguration());
0
Before creating the Controller, make sure that there is no line with something like this in the event OnModelCreating
:
modelBuilder.Configurations.Add(new UsuarioConfiguration());
Yes there is, so I couldn’t use Fluent API
? to map the entities with the EF
@Pablovargas You may, but be aware that Scaffolding does not work well with Fluent API.
Browser other questions tagged c# asp.net-mvc-5 entity-framework-6
You are not signed in. Login or sign up in order to post.
He’s saying that you’ve already created a controller for this object, it wouldn’t be that?
– PauloHDSousa
no controller yet
– Pablo Tondolo de Vargas
You’re wearing the event
OnModelCreating
to set something up Model?– Leonel Sanches da Silva
Yes I’m using
Fluent API
.– Pablo Tondolo de Vargas