entity framework mark as modified code first 5 -


marking property modified should done this:

using (var context = new unicornscontext()) {     var unicorn = context.unicorns.find(1);     var nameismodified1 = context.entry(unicorn).property(u => u.name).ismodified;      // use string property name     var nameismodified2 = context.entry(unicorn).property("name").ismodified; } 

code sample here

in code unicornscontext extends dbcontext.

i don't have entry method context. whats's wrong?


Comments

Popular posts from this blog

python - Scipy curvefit RuntimeError:Optimal parameters not found: Number of calls to function has reached maxfev = 1000 -

c# - How to add a new treeview at the selected node? -

java - netbeans "Please wait - classpath scanning in progress..." -