Is there any similar method similar to InsertOnSubmit in LINQ RRS feed

  • Question

  • Hello,

    I found there is a InsertOnSubmit method in linq which can change database for several times and submit them together like a transaction.

    When accessing the database with System.Data and System.Data.SqlClient, is there any similar way to execute several sql statement and submit them together to the database?


    Saturday, July 19, 2008 7:57 AM


  • LINQ to SQL doesn't offer direct support for a 'batch' update.


    Your best bet is to write a stored procedure that performs the bulk update and invoke it as a method on the DataContext.


    Hope that helps,




    Monday, July 21, 2008 7:38 PM