Entity framework EF6-配置中的数据库名称
我希望通过app.config文件(而不是使用数据上下文的构造函数)在EF6中设置数据库名称。配置中有提供程序和数据库初始值设定项,但数据库名称在哪里?配置行是什么样子的Entity framework EF6-配置中的数据库名称,entity-framework,entity-framework-6,Entity Framework,Entity Framework 6,我希望通过app.config文件(而不是使用数据上下文的构造函数)在EF6中设置数据库名称。配置中有提供程序和数据库初始值设定项,但数据库名称在哪里?配置行是什么样子的 干杯,连接字符串中的目录名称 <connectionStrings> <add name="MyContextName" connectionString="Data Source=localhost;Initial Catalog=TheDbName;Integrated Security=True
干杯,连接字符串中的目录名称
<connectionStrings>
<add name="MyContextName" connectionString="Data Source=localhost;Initial Catalog=TheDbName;Integrated Security=True;MultipleActiveResultSets=True;App=EntityFramework" providerName="System.Data.SqlClient" />
</connectionStrings>