How to report DataContext.SubmitChanges() progress with LINQ2SQL
- by kzen
If there is a foreach loop that contains DataContext.Customer.InsertOnSubmit(cust) for example:
foreach (Object obj in collection)
{
Customer cust = new Customer
{
Id = obj.Id,
Name = obj.Name
...
};
DataContext.Customer.InsertOnSubmit(cust);
}
And outside of the loop there is a call to:
DataContext.SubmittChanges();
Is there a way to obtain the SubmittChanges progress in order to report the progress back to the user (or a different approach without moving the SubmittChanges into the loop)?