Model First with DbContext, Fails to initialize new DataBase

前端 未结 4 1248
滥情空心
滥情空心 2020-12-03 06:52

I give up. I found this: http://blogs.msdn.com/b/adonet/archive/2011/03/15/ef-4-1-model-amp-database-first-walkthrough.aspx And thought, that\'s cool. So I quickly redesigne

4条回答
  •  臣服心动
    2020-12-03 07:46

    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.

提交回复
热议问题