ria entity remove bug
Posted
by Greg
on Stack Overflow
See other posts from Stack Overflow
or by Greg
Published on 2010-03-16T15:04:41Z
Indexed on
2010/03/16
15:21 UTC
Read the original article
Hit count: 291
RIAServices
|Silverlight
hello, I am trying out the ria services and I am experiencing this problem that seems very strange to me. I am creating a new entity of type "House" and add it to context without saving the context so the id of the new entity is 0, after i remove this entity and add another new entity of type "House" again and again without saving the context, here comes the weird part, now I have an entity of type "City" which holds entityset of all "Houses" in that city, so to put the newly created entity "House" into the city i do something like this - house.City = city, where house is type "House" and city is type "City", afte this step a check the context and suddenly there are 2 entities of type "House" with id 0, one of them is the one I have deleted at the beginning.
Any idea what is causing this and how to fix it??
thank you Greg
© Stack Overflow or respective owner