I am trying to update only the modified fields of the object in the DB Suppose the exising object in db is -
User user = new User(){
Name = "Sid",
Age = 20,
Gender = "Male"
}
and after modification it looks like this -
User user = new User(){
Name = "Siddhant",
Age = 20,
Gender = "Male"
}
Now only one field is changed that is Name, how can I run a query so that only the changes get updated in
DB.
Also, the User class in the above example could be more complex like it will have properties of user-defined data types as well.