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

Popular posts from this blog

How to run C# code using mono without Xamarin in Android? -

c# - SharpSsh Command Execution -

python - Specify path of savefig with pylab or matplotlib -