1
Vote

Bug in Update with EF sample

description

Hello, I have been trying to test the sample that used Entity Framework but I found a bug.
 
When the update method is called, the state of the entity is "detached" and data are not updated.
 
Any suggestion?
 
Regards,
 
Sebastián

comments

plblum wrote Jan 9, 2012 at 10:46 PM

Thanks for looking into my work, Sebastián.
I've been working on a version of this for my commercial product, Peter's Data Entry Suite (http://www.peterblum.com/des/home.aspx). That code has worked well, and is nearly identical to the EFEntityDAO<T>.Update() method. The only difference is that I no longer have the line:
vDataContext.AcceptAllChanges();
Would you remove that line and see what happens?

srocco wrote Jan 10, 2012 at 10:08 AM

Hello Peter, thank you very much!!!

I have removed this line and now work correctly!

I take this opportunity to congratulate you for the code. It is being very helpful to me.

Thanks again!

Regards!

Sebastián

wrote Feb 2, 2013 at 2:28 AM