1

EF で使用したい新しいデータベースに接続しようとしています。残念ながら、適切な接続文字列を構築できません。データベース初心者ですので、お手柔らかにお願いします。誰かが ConnectionStrings を説明するリンクを教えてくれたら、私は感謝します。

私の App.config は次のようになります: EDIT

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <configSections>
    <!-- For more information on Entity Framework configuration, visit http://go.microsoft.com/fwlink/?LinkID=237468 -->
    <section name="entityFramework" type="System.Data.Entity.Internal.ConfigFile.EntityFrameworkSection, EntityFramework, Version=5.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089" requirePermission="false" />
  </configSections>
  <connectionStrings>
    <add name="Test.Properties.Settings.DatabaseConnectionString"
    providerName="System.Data.SqlClient"
    connectionString="Server=.\SQLEXPRESS;Database=C:\TestControlling\Controlling.mdf;Integrated Security=True;" ></add>
  </connectionStrings>
  <startup>
    <supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.5" />
  </startup>
  <entityFramework>
    <defaultConnectionFactory type="System.Data.Entity.Infrastructure.SqlConnectionFactory, EntityFramework">
      <parameters>
        <parameter value="Data Source=.; Integrated Security=True; MultipleActiveResultSets=True" />
      </parameters>
    </defaultConnectionFactory>
  </entityFramework>
</configuration>
4

1 に答える 1