Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
.edmxエンティティフレームワークモデルがC#でDbContextまたはObjectContextを使用しているかどうかをプログラムで確認するにはどうすればよいですか?
DbContextを使用するのは.edmxではありません。デフォルトのジェネレーターテンプレートを使用しない場合、コンテキストは選択したテンプレートによって生成されます。
実行時に、コンテキストオブジェクトがDbContextまたはObjectContextのタイプであるかどうかを確認できます
if(_ctx is DbContext) {...}