Can I update entity using repository without previous loading? I want to just pass only Id and changed fields - can I do this? Models often contains required navigation properties, so updating model without loading all related fileds caused toDbEntityValidationException due to null required fields.
3 Answer(s)
-
0
Hi,
Entity Framework does not support it as you probably know. There are some 3rd party libraries doing it. Example: <a class="postlink" href="https://github.com/loresoft/EntityFramework.Extended">https://github.com/loresoft/EntityFramework.Extended</a>
-
0
Hi, I'm also having trouble using EF.Extended because we are in a transaction scope aready
-
0
Hi,
Actually we haven't tried <a class="postlink" href="https://github.com/loresoft/EntityFramework.Extended">https://github.com/loresoft/EntityFramework.Extended</a>, maybe you can search for another library for this operation.