アプリケーションにlinq-to-sql datacontextを使用しています。私は次のクラスを持っています
テーブルをインスタンス化する UserDataContext
var db = new UserDataContext();
Mvc Mini Profiler をそれに挿入するにはどうすればよいですか?
別の回答で見つかった次のパーシャルで UserDataContext を拡張しようとしましたが、コードがヒットすることはありません。
partial class UserDataContext
{    
public static UserDataContext Get()
    {
        var sqlConnection = new HelpSaudeAPDataContext().Connection;
        var profiledConnection = new MvcMiniProfiler.Data.ProfiledDbConnection(new SqlConnection("UserConnectionString"), MiniProfiler.Current);
        return new HelpSaudeAPDataContext(profiledConnection);
    }
}
残念ながら、mvc ミニ プロファイラー接続を単純に渡すことができる var db 接続を備えた単一ポイント リポジトリはありません。
var db = UserDataContext(profilerConnection);