Extension for bulk update/delete/insert queries
One of the most missing features in linq. Allowing to bulk update/delete/insert rows (maybe as an extension lib like PredicateBuilder) would be absolutely awsome!
Thanks
-
NickR commented
Update to previous comment: That code doesn't seem to work in LinqPad currently as GetProperties only returns related entities, omitting all other database fields. I'm unsure if that's a LinqPad-specific problem or not.
-
NickR commented
I think this is an important idea. The LinqPad site even states how LinqPad is GREAT except for a few cases including Bulk Insert. It need not be the case.
There's an implementation of Linq-toSQL bulk Insert here: https://stackoverflow.com/questions/9220901/bulk-insert-with-linq-to-sql
Integrating it directly in LinqPad under Util.BulkInsert or similar would seem to offer some advantages in terms of ready access to the DataContext and all the entities.