I simply want to achieve this line of SQL:
UPDATE table1
SET table1.col = table2.col
FROM table2 INNER JOIN
table1 ON table2.id = table1.id
How can that be done using Entity Framework with minimal number of round-trips?
All I can think of is using foreach to loop through my table2
and update it's related entry in table1
, but that leads to a whole lot of round-trips, doesn't it?