Tuesday 3 March 2015

Entity Framework 6



Error -
Code generated using the T4 templates for Database First and Model First development may not work correctly if used in Code First mode. To continue using Database First or Model First ensure that the Entity Framework connection string is specified in the config file of executing application. To use these classes, that were generated from Database First or Model First, with Code First add any additional configuration using attributes or the DbModelBuilder API and then remove the code that throws this exception

Reason - normal connection string is used rather than the one required by EF where it needs information about metadata like .csdl, ssdl, msl 

No comments:

Post a Comment