Advice Needed: Multiple transactions using same Linq2Sql datacontext simulteneously RRS feed

  • Question

  • Hi,

    Here is the scenario

    I have an service  that uses ONE DataContext instance for each user/call and performs database operations.

    Service gets very high volume of calls and uses TransactionScope to do the Transactions. 

    My question is,

    1) Is it a good practice ?

    2) Is it safe ?

    3) What possible ways things can go wrong this way ?

    4) Could there be a race-condition ?

    5) Could transactions overlap on each other and cause trouble ?

    6) Should I use separate connection per User ? I get 30 unique users in a second on average.

    Your input will be greatly appreciated.



    Friday, July 6, 2012 1:50 PM