Quantcast
Channel: entityframework Discussions Rss Feed
Viewing all articles
Browse latest Browse all 1793

New Post: Add AddRange() and RemoveRange() to IDbSet?

$
0
0
Hi,

I've just been reviewing the changes in EF6, and I note that AddRange() and RemoveRange() are only on the DbSet/DbSet<T> classes, and not on the IDbSet<T> interface.

Would it be possible to either:

a) Add these methods to IDbSet<T>;
or b) Add a new interface (that derives from IDbSet<T>?) that adds these methods if the breaking change a would introduce is not acceptable?

Some of my data access code wraps access to IDbSet<T> behind another interface, and it would be nice to expose AddRange() and RemoveRange() on this custom wrapping interface after updating to EF6 by just calling into the IDbSet<T> it wraps, rather than having to cast it to DbSet<T> first. It makes the wrapping implementation a bit cleaner if there's an interface as it wouldn't need to introduce a dependency on a specific EF concrete type.

Thanks,
Martin

Viewing all articles
Browse latest Browse all 1793

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>