Add new Controller

0

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.

    
asked by anonymous 09.01.2015 / 18:50

2 answers

1

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());
    
11.01.2015 / 02:12
0

Before creating the Controller , make sure there is no line with something like this in the OnModelCreating event:

modelBuilder.Configurations.Add(new UsuarioConfiguration());
    
11.01.2015 / 20:27