-
-
Notifications
You must be signed in to change notification settings - Fork 99
Open
Labels
Description
I would like to know if we can define if specific attribute of the entity is not to be updated.
eg.
public class myclass {
public string col1;
public string col2;
publict int col3;
myclass () { col1 = col2 = string.Empty, col3 = 0}
}
I receive myclass object in through post/put request. I know that col3 is set to 0 by default. However while updating the db, i do not want to update col3 value if entity already exists.
can i define something like
updategraph(myclass_obj, map=> map.donotmodify(obj=>obj.col3) )
if so, can we do something as below:
foo(myclass entity, Expression<> dontmodify)
{
updategraph(entity, mm=>mm.OwnerCollection().AddToMap(dontmodify))
}
where AddToMap adds into the the maps of IUpdateconfiguration.