A
A
alesto2013-12-09 20:20:15
ASP.NET
alesto, 2013-12-09 20:20:15

Why does the Entity Framework object still persist despite context.detach()?

I take out the object and manipulate it. and After saving, I get a copy of the object in the database, regardless of context.detach. And yes, the object is inside the using(context) {} section. What am I doing wrong . After all, in theory, the entity framework should stop tracking the object and not save it?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
C
CrackedSapphire, 2013-12-09
@CrackedSapphire

To solve the problem at the root AsNoTracking msdn

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question