简体   繁体   中英

update same datatable using Linq without loop

I have one datatable with 26 columns in it. I need to update specific column based on filter. but I dont want to do it using iteration because it's having thousands of records. It waill affects performance.

is there any way to do that. I am new for linq so I searched for that but not getting proper solution. There are some solutions but I can not understand it.

Please if anyone having solution?

This is where you have to either drop into ADO or seriously customize linq or EF.

Bulk inserts and updates are not something it does nicely.

Is batch or bulk insert possible in Linq 2 Sql ?

the same goes for EF.

Multiple row update is not supported by EF. For this better you use stored procedure. This is the reason EF has provided support for executing stored procedure. Use it and enjoy :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM