Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Update only changed columns
Message
 
 
À
11/01/2018 16:43:07
Information générale
Forum:
C#
Catégorie:
Entity Framework
Divers
Thread ID:
01657108
Message ID:
01657123
Vues:
36
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform