1) Using EntityFramework 6.2, MVC5, and Data first methodology. i.e. I created the database manuall a long time ago. Was working for many months but earlier today I updated from SQL 2008 developer verson to SQL 2012, yeah I'm a masochist.
I started getting this error recently; System.Data.Entity.Infrastructure.UnintentionalCodeFirstException: '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. This will not work correctly. To fix this problem do not remove the line of code that throws this exception. If you wish to use Database First or Model First, then make sure that the Entity Framework connection string is included in the app.config or web.config of the start-up project. If you are creating your own DbConnection, then make sure that it is an EntityConnection and not some other type of DbConnection, and that you pass it to one of the base DbContext constructors that take a DbConnection. To learn more about Code First, Database First, and Model First see the Entity Framework documentation here: http://go.microsoft.com/fwlink/?LinkId=394715'
Everything works fine on my development machine but when I publish it I get an 500 server error, I'm assumng because of the meta data in the connection string;
I'm at a lose as to what to address here.
I've tried to disable code first - without success
--- Database.SetInitializer<SQLContext>(null);
--- Deleted the __MigrationHistory table
I've generated the edmx files numerous times
What I'm wanting to do is return to using ADO.NET connection strings and for to be able to create the edmx file without the system thinking it's a code first DB.