I am using DTOs and converters in an entity framwork scenario. I want to update an entity. So I put this statement: databasecontext.Tablename(s).Attach(entityobj); Whenever it gets here the program ends with this error: An entity with the same identity already exists in this EntitySet.
I felt i could get around this by saying:databasecontext.Tablename(s).Detach(entityobj);
before i called Attach again. But the program still fails on the Attach statement.
What am i missing? Which method on the DB context calls Update in the Domain Service?
Thanks for the answers in advance.