properties - How to ignore property using graphdiff? -
i'm using ef6 graphdiff , edmx , must ignore property of particular entity.
how should since getting property insert or update leave null field?
the way able work around while still benefiting ease of graphdiff follows:
- set object equal graphdiff method
- set each property wish ignore .ismodified = false
(example)
user = db.updategraph(user, map => map .associatedcollection(u => u.userroles) .associatedcollection(u => u.teams)); db.entry(user).property(u => u.password).ismodified = false; db.entry(user).property(u => u.salt).ismodified = false; _context.savechanges();
Comments
Post a Comment