Model First with DbContext, Fails to initialize new DataBase

This is wrong connection string. Once you are using model-first / database-first (EDMX) you must use Entity connection string with referencing .ssdl, .msl and .csdl metadata files. Also be aware that you must create your database in design time when creating model from EDMX = you must generate SQL script and execute it to create the database.

Leave a Comment