开发者

Which connectionstring to use in EF Code-first with an existing database

开发者 https://www.devze.com 2023-04-09 17:58 出处:网络
The existing database was created in the project itself and resides on App_Data as prompted by visual studio while adding a new sql database item to the project.

The existing database was created in the project itself and resides on App_Data as prompted by visual studio while adding a new sql database item to the project.

So, should i use t开发者_如何学Chis string :

data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\Database.mdf;User Instance=true"

Or this one

Data Source=.\SQLEXPRESS;Database=Database22;Integrated Security=SSPI;


I am not following why you should use those connection strings with EF. Take a look at this: How to: Build an EntityConnection Connection String

0

精彩评论

暂无评论...
验证码 换一张
取 消