クエリをテストするためのテストプロジェクトを作成します。Entity Connection
を使用するメソッドをテストしようとしたときを除いて、すべてのことがうまく行きます。CodeFirst:指定された名前付き接続がコンフィグレーション内に見つかりません
The specified named connection is either not found in the configuration, not intended to be used with the EntityClient provider, or not valid.
TestQuery
Projecでapp.config
で私の接続文字列
<connectionStrings>
<add name="DataLayer.Context" connectionString="Data Source=.;Initial Catalog=TestQ;Integrated Security=True" providerName="System.Data.SqlClient"/>
</connectionStrings>
エンティティにLINQを使用するすべてのメソッドはうまく動作し、これ以外のデータを提供します:私のスタートアッププロジェクトがあるトン?
'.'は'データソース 'の有効な値ではありませんか? – masa
@masa:これは私のローカルデータベースです! –
イメージの代わりにコピー&ペーストしてください。 –