The ASP.NET linq SubmitChanges method commits changes for all previous database modifications since the last time it was called.
I have a case where I do something like the following:
ClassX x = new Abc.Linq.ClassX();
DataContext.InsertOnSubmit(x);
ClassY y = new Abc.Linq.ClassXY();
DataContext.InsertOnSubmit(y);
DataContext.SubmitChanges();//x and y are committed to the database
I would like to insert y but not X in the line above. Then I would like to insert X with another call to SubmitChanges() sometime later. I have to execute the code in the order shown.
Is that possible? Or should I be calling something other than SubmitChanges()?