I want to update tables using ExecuteCommand()
in below manner:
using (var context = new FMDataContext())
{
// how do I execute below two steps in a single transaction?
context.ExecuteCommand("Update Table1 set X = 1 Where Y = 2");
context.ExecuteCommand("Update Table2 set X = 3 Where Y = 4");
}
There is an answer here for this but it's for EF, I am using Linq To Sql.