locked
Entity Framework update issue RRS feed

  • Question

  • Dear all,
    I am running into an update issue where i have a a parent object and related child object onto which i am trying to make an update.
    my process to update is that i fetch the child object ( which i confirm is the correct object to update) update the child object in the Business layer and then when i eventually try to save the change for this child object using context.savechanges() i get this error which say 0 related entity found 1 expected...and this is on the parent object.  Since i am not adding new object to Entity collection what does this error mean ? If referential constraints was violated in first place it should have violated when i was inserting data rather then updating data. .

    Any suggestion are more then welcome... I have spent quite a lot amount of time & still keep seeing this..
    Thursday, July 30, 2009 2:47 PM

All replies

  • Hi Anshul,
     Can you give us an idea of what your Service's schema looks like ?
     Also , a detailed request/response trace via Fiddler would be helpful.
    Phani Raj Astoria http://blogs.msdn.com/PhaniRaj
    Monday, August 3, 2009 6:45 AM
    Moderator