Last post Aug 28, 2014 10:18 PM by Kevin Shen - MSFT
Aug 28, 2014 03:51 AM|billcrawley|LINK
I need to use a transaction scope object in my app Normally I'd do something like:
using (var ts = new TransactionScope())
'my code here
....More code, more SaveChanges
Trouble is through the object browser
System.Data.Entity DBContext object only has a SaveChanges() method and no overloads. AcceptAllChanges method isn't listed. Is it early do I need another coffee? HOw should I handle the above in EF 4.3?
Aug 28, 2014 10:18 PM|Kevin Shen - MSFT|LINK
For your problem, i installed entity framework 4.3 in my visual studio and tested your code.
There is no AcceptAllChanges() for dbcontext method in entiry framework 4.3.0.
But you can call it using ObjectContext ：
ObjectContext obj = new ObjectContext("connstring");