none
Stored Procedures and Concurrency Checking RRS feed

  • Question

  • If an app does all it's updates and deletes via stored procedures, is L2S still able to do the same level of concurrency checking it would do if we were updating/deleting without sprocs? I suspect the answer is no, but wanted to make sure.

    Thanks
    Wednesday, October 14, 2009 12:55 PM

Answers

  • Hi Randy,

    Do you need any further assistance?   If so, please feel free to let me know.

    Have a nice day!


    Best Regards,
    Lingzhi Sun 

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Randy Minder Tuesday, October 20, 2009 11:42 AM
    Tuesday, October 20, 2009 12:48 AM
    Moderator
  • Hi Randy,

     

    If we use insert/update/delete stored procedures to, the optimistic concurrency check can also be performed.  The difference is dynamic SQL will generate the concurrency checking command automatically based on our settings (Update Check property of the column), while when using stored procedures, we can do more customize at both the stored procedure side and LINQ to SQL side.  

     

    For detail, please see “Step 4: Doing Customer Updates with a SPROC” in Scott Gu’s great article: LINQ to SQL (Part 7 – Updating our Database using Stored Procedures). 

     

     

    Have a nice day, Randy!

     

     

    Best Regards,
    Lingzhi Sun


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, October 15, 2009 3:36 AM
    Moderator

All replies

  • Hi Randy,

     

    If we use insert/update/delete stored procedures to, the optimistic concurrency check can also be performed.  The difference is dynamic SQL will generate the concurrency checking command automatically based on our settings (Update Check property of the column), while when using stored procedures, we can do more customize at both the stored procedure side and LINQ to SQL side.  

     

    For detail, please see “Step 4: Doing Customer Updates with a SPROC” in Scott Gu’s great article: LINQ to SQL (Part 7 – Updating our Database using Stored Procedures). 

     

     

    Have a nice day, Randy!

     

     

    Best Regards,
    Lingzhi Sun


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    Thursday, October 15, 2009 3:36 AM
    Moderator
  • Hi Randy,

    Do you need any further assistance?   If so, please feel free to let me know.

    Have a nice day!


    Best Regards,
    Lingzhi Sun 

     


    Please remember to mark the replies as answers if they help and unmark them if they provide no help.
    Welcome to the All-In-One Code Framework! If you have any feedback, please tell us.
    • Marked as answer by Randy Minder Tuesday, October 20, 2009 11:42 AM
    Tuesday, October 20, 2009 12:48 AM
    Moderator