Jaa


Troubleshooting Razor + Entity Framewok + C#

Nuestro amigo Javier Caceres nos comparte su artículo:

Troubleshooting Razor + Entity Framewok + C# clip_image001

While coding-first with ASP.Net MVC Razor and the Entity Framework probably you will get some of these Microsoft Visual Studio’s weird messages:

“Unsupported context type”: this message may arise when adding a controller and it can be related with a problem in your context class; maybe you forgot extending from “DbContext”.

“The provider did not return a provider manifest token”: this problem may arise anytime if your connection string name does not match your context class. More information here.

“Unable to find the requested .Net Framework Data Provider”: this message may arise when adding a controller and it may be related with a problem in the connection string of your context class.

“Unable to retrieve metadata for ‘YourProject.Models.AModel’: this message tends to appear while adding a controller when the views template is selected and there is a mismatch between your model and the database table schema.

Ver más aquí.
Saludos.

Fernando García Loera (Community Program Manager – Latin America Region)

Icono Ferglo 40x116twitter 40x40RSS 40x40facebook 40x116linkedin40x40xbox 40x40

Que es un MVP? / Tips para ser MVP