mvc code first、db first 数据库链接串区别

 

<connectionStrings>

code first:

    connectionString="Data Source=192.168.2.208;     <add name="DBContext"

initial catalog=BPMS_2 ;

persist security info=True;

user id=sa;

password=www.123.com;

MultipleActiveResultSets=True;

App=EntityFramework"  

providerName="System.Data.SqlClient"/>

 

</connectionStrings>

<connectionStrings>

db first:

<add name="BPMS_2Entities" connectionString="metadata=res://*/ModelTEST.csdl|res://*/ModelTEST.ssdl|res://*/ModelTEST.msl;
provider=System.Data.SqlClient;
provider connection string=&quot;
data source=HZB-PC;
initial catalog=BPMS_2;
user id=sa;
password=www.123.com;
MultipleActiveResultSets=True;
App=EntityFramework&quot;" providerName="System.Data.EntityClient" />

 

</connectionStrings>

   

 

posted @ 2018-01-22 16:37  innercosmos  阅读(139)  评论(0编辑  收藏  举报