Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Update only changed columns
Message
 
 
To
11/01/2018 16:43:07
General information
Forum:
C#
Category:
Entity Framework
Miscellaneous
Thread ID:
01657108
Message ID:
01657123
Views:
37
>That's been my beef for years. What EF and other .NET data handling routines need is the old "Key & Modified" update capability that's been in Foxpro for decades now.

I actually found that was wrong in these 3 forms, so I fixed them, but I believe we used that same pattern in many other our API controllers and this may present a problem :(

It was the way we AutoMapped. We just created a new object from the model. We should have been using a different way (which is also available). We should have retrieved the row in the Update method, then use that object to automap model into that object. This way the generated UPDATE command only updated the changed values.

There is a problem with this approach as well. This way we're retrieving the latest values just because we're doing an update (and our model could have used older values)...
If it's not broken, fix it until it is.


My Blog
Previous
Reply
Map
View

Click here to load this message in the networking platform