1

An in-development ASP.Net MVC app that was working fine until today has now started throwing the following error:

The context is being used in Code First mode with code that was generated from an EDMX file for either Database First or Model First development.

The data layer of this app was done completely in Code-first. There are not any EDMX files of any sort involved. I am using Migrations.

My connection string is

<add name="MicroContentContext" 
connectionString="Data Source=MdDB;
Initial Catalog=MyCaatalog;
Integrated Security=True;MultipleActiveResultSets=True;"
providerName="System.Data.SqlClient" />

What has gone wrong and what can I do to fix it?

John S
  • 7,909
  • 21
  • 77
  • 145
  • What changed - look in your source control – ErikEJ Mar 26 '15 at 17:48
  • Are you using an EntityConnection connection string by mistake? – ErikEJ Mar 26 '15 at 17:55
  • The only thing I did to my code was add another class and the appropriate DbSet to my context class – John S Mar 26 '15 at 18:07
  • http://stackoverflow.com/questions/7944596/entity-framework-cant-use-the-dbcontext-model-being-created – ErikEJ Mar 26 '15 at 18:17
  • Erik That refers to a situation where an EDMX file is involved or used at some point. As my question states EDMX files never were involved in this project. – John S Mar 26 '15 at 20:12

0 Answers0