c# - Strange InvalidOperationException when updating entity with RIA Services -
i'm working ef4.1, ria services , silverlight. i'm having bizarre problem in update scenario.
the domain model quite simple; deals requests , persons. have 1-to-n relationship. citizen can have multiple requests although in reality never occur since the app not provide functionality so.
request has property called 'urgent', alter true , seek save. goes until actual persisting begins via method:
public void updaterequest(request currentrequest) { request original = changeset.getoriginal(currentrequest); seek { objectcontext.requests.attachasmodified(currentrequest, original); } grab (exception ex) { // weirdness here! } }
which pretty much standard generated method ria services (except try/catch handler added debugging purposes.) next error:
when check changeset, there no requests added, i'm sure didn't add together accident.
an object same key exists in objectstatemanager. objectstatemanager cannot track multiple objects same key.
i don't understand this... there literally no added objects in objectstatemanager, changeset has no added objects; hell coming from? tracked properties beingness changed, i'm sure key not overwritten, nor beingness added or other funkyness.
can shed lite here? driving me crazy several days far...
c# .net silverlight entity-framework wcf-ria-services
No comments:
Post a Comment