Entity Framework - Using Transactions or SaveChanges(false) and AcceptAllChanges()?
Posted
by mark smith
on Stack Overflow
See other posts from Stack Overflow
or by mark smith
Published on 2009-05-02T20:50:03Z
Indexed on
2010/04/16
5:23 UTC
Read the original article
Hit count: 993
Hi there,
I have been investigating transactions and it appears that they take call of them selves in EF as long as i pass false to savechanges..
SaveChanges(false)
and if all goes well then AcceptAllChanges()
Question is what is something goes bad, don't have to rollback? or as soon as the my method goes out of scope its ended?
What happens to any indentiy columns that were assigned half way through the transaction.. i presume if somebody else added a record after mine before mine went bad then this means there will be a missing Identity value.
Is there any reason to use standard "transactionScope" in code?
ideas? - thanks
© Stack Overflow or respective owner