You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In my asp.net core + ef core I am using this update mechanism a lot: _context.Entry(existing).CurrentValues.SetValues(received);
Many times I want to update only some properties of the object.
There are several ways how this can be accomplished.. creating and sending ViewModel, setting the properties manually instead of using the CurrentValues.SetValues or overriding the values of some properties manually.
These all works, but they add some complexity.
I would love to have something like:
SetValuesExcept("PropertyX", "PropertyY")
that would update all properties on my object except PropertyX and PropertyY.
The text was updated successfully, but these errors were encountered:
In my asp.net core + ef core I am using this update mechanism a lot:
_context.Entry(existing).CurrentValues.SetValues(received);
Many times I want to update only some properties of the object.
There are several ways how this can be accomplished.. creating and sending ViewModel, setting the properties manually instead of using the CurrentValues.SetValues or overriding the values of some properties manually.
These all works, but they add some complexity.
I would love to have something like:
SetValuesExcept("PropertyX", "PropertyY")
that would update all properties on my object except PropertyX and PropertyY.
The text was updated successfully, but these errors were encountered: