Ideally, AddRange and RemoveRange should be added to IDbSet. However, adding members to an interface is a breaking change and hence we should consider whether or not this is acceptable given the way the interface is used. We should also consider extension methods, although this makes things harder for frameworks that automatically create test doubles. Another option is to introduce a base class, or make DbSet itself more mockable. Finally, we should consider the other changes that have been proposed for IDbSet and how looking at all the changes as a whole may change what we decide.
Comments: Verified. I was able to easily create mocks for these and other methods that have been added to DbSet.
Comments: Verified. I was able to easily create mocks for these and other methods that have been added to DbSet.