3 ms·
IF you have the primary key of the entity that you want to update, EF allow you to attach it to the context without querying the database. After attaching it to
by Flott 9y ago
IF you have the primary key of the entity that you want to update, EF allow you to attach it to the context without querying the database. After attaching it to the context, you can set the new values, mark them as modified and (finally!) call SaveChanges.
---
I do agree with you though! Dealing with it's limitations and edge case mean, sooner or later, falling back to SQL.
EF is (imho) very hard to master and very easy to use "badly".
- deleted 9y ago[deleted]