EntityFramework在不同数据库下的配置

1.SQLServer:

EntityFramework在不同数据库下的配置
<connectionStrings>  
    <add name="EntityDesignEntities" connectionString="metadata=res://*/EntityDataModel.EntityDesign.csdl|res://*/EntityDataModel.EntityDesign.ssdl|res://*/EntityDataModel.EntityDesign.msl;provider=System.Data.SqlClient;provider connection string="data source=.;initial catalog=DevBase;persist security info=True;user id=sa;password=xxx;multipleactiveresultsets=True;App=EntityFramework"" providerName="System.Data.EntityClient" />  
  </connectionStrings>  
EntityFramework在不同数据库下的配置

2.Oracle:

<connectionStrings>  
    <add name="EntityDesignEntities" connectionString="metadata=res://*/EntityDataModel.EntityDesign.csdl|res://*/EntityDataModel.EntityDesign.ssdl|res://*/EntityDataModel.EntityDesign.msl;provider=Oracle.DataAccess.Client;provider connection string="data source=xe;password=xxx;persist security info=True;user id=sa"" providerName="System.Data.EntityClient"/>  
  </connectionStrings> 

 

3.MySQL:

 

  1. <connectionStrings>  
  2.     <add name="EntityDesignEntities" connectionString="metadata=res://*/EntityDataModel.EntityDesign.csdl|res://*/EntityDataModel.EntityDesign.ssdl|res://*/EntityDataModel.EntityDesign.msl;provider=MySql.Data.MySqlClient;provider connection string="server=localhost;user id=sa;password=xxxx;persist security info=True;database=world"" providerName="System.Data.EntityClient"/>  
  3.   </connectionStrings>

EntityFramework在不同数据库下的配置,布布扣,bubuko.com

EntityFramework在不同数据库下的配置

上一篇:关于textarea标签输出数据库数据时出现大量空格导致格式不一致的问题


下一篇:​Kafka分区分配策略