Hi, I have DTC configured as outlined on MS website to support for remote transaction. I have the following code always giving me error.
using (TransactionScope ts = new TransactionScope())
{
Category c = new Category();
c.Name = "Cat1";
c.Save();
Product p = Product.SingleOrDefault(x=>x.ProductID==1);
p.Title = "new title";
p.Save();
ts.Close();
}
However if I move the second block of code out of the suing block it works just fine. What I want to do is bind those two block of code into one trascation. What could be the readon? Thanks,