Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Update query with entityframework

How to write an update query in EntityFramework using LINQ to Entities?

EDIT: And if it is possible how this query can be written in Entity SQL?

like image 965
Eugeniu Torica Avatar asked Mar 18 '26 09:03

Eugeniu Torica


1 Answers

There are 2 aternatives:

  • Same as Lloyd fetch entity from database, change it's properties and submit changes back into database.
  • Write an update statement in a stored procedure, then execute the stored procedure.
like image 58
Shiraz Bhaiji Avatar answered Mar 21 '26 16:03

Shiraz Bhaiji



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!