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.
IModel インターフェイスを実装するエンティティがいくつかあります。エンティティがこのインターフェイスを実装しているすべてのテーブルからレコードを取得したいと考えています。出来ますか?
私は解決策を見つけました:
context.ObjectStateManager .GetObjectStateEntries(EntityState.Added /* All states here */) .Select(e => e.Entity) .OfType<IModel>() .ToList();