Scaffolding ASP.NET giving error

1

The error is generated using VS 2012. When I try to create the Controller for my News using the Entity framework, I have already tried in several ways. My database you can see on the server explorer on the left.

I'm trying to create the controller for the CRUDS.

"Unable to retrieve metadata for" BraveryBranded.ASP.Models.News ". Object reference not set to an instance of an object."

    
asked by anonymous 06.02.2014 / 20:00

2 answers

1

The problem occurred because the model folder was not the default created by VS. I had left my models inside the 'Area' admin, so it did not work.

To resolve, just move to the default Model folder and try to use scaffolding again.

    
08.02.2014 / 01:27
0

Have you ever rebuild your application? if you are doing scaffolding you must rebuild after changing the properties of a class.

    
06.02.2014 / 20:19