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.
It would be nice if Visual Studio automatically fixes well know problems or for at least it displays some probable solutions. Finally (and off-topic) I would like to mention that if you can not edit a table in MySQL workbench may be because the table has no a PK defined.
Javier Andrés Cáceres AlvisMicrosoft Most Valuable Professional – MVP Intel Black Belt Software Developer