エンティティ フレームワーク edmx の接続文字列がありました。これは、メタデータを含む通常の EF 接続文字列です。
今、私は mvc-mini-profiler を実装しており、コンテキストを作成するために以下のメソッドを書きました。現在、SQL接続文字列部分のみを使用しており、EF接続文字列は使用していません。
今は動作しますが、メタデータ (.csdl、.ssdl アドレス) をどのように取得しているか興味があります。
public static T GetProfiledContext<T>() where T : ObjectContext
{
// create connection
var sqlConnection = new SqlConnection(ConfigurationManager.ConnectionStrings["LocalSqlServer"].ConnectionString);
// wrap the connection with a profiling connection that tracks timings
var profiledDbConnection = MvcMiniProfiler.Data.ProfiledDbConnection.Get(sqlConnection, MiniProfiler.Current);
// create context
return profiledDbConnection.CreateObjectContext<T>();
}