I get a Cannot remove an entity that has not been attached. error message Cannot remove an entity that has not been attached. when trying to delete a record. I googled around and although there are many places to find a solution to fix this problem, the proposed fix does not allow me:
using (MyDataContext TheDC = new MyDataContext()) { TheDC.MyTable.Attach(ARecord);
My bigger question is this: this problem ONLY affects delete requests or affects other kinds of requests, and I just haven't run into this problem yet. I wrote an update request and it seems to work without errors in this error.
Thanks.
c # linq linq-to-sql
frenchie
source share