问题
using EF 4.3.1 in SaveChanges(), i'm trying to get a list of all entries for entities which implement a specific interface. My entities implement multiple interfaces, one of which is IAuditable. The following doesn't return any entries, even though entries with entities of type IAuditable do exist.
var auditableEntities =
ChangeTracker.Entries<IAuditable>().Where(
e => e.State == EntityState.Modified | e.State == EntityState.Added);
来源:https://stackoverflow.com/questions/12970257/changetracker-entriest-not-returning-entries-with-entities-of-type-t