Downside of using TransactionScope RequiresNew

前端 未结 2 718
盖世英雄少女心
盖世英雄少女心 2021-01-01 19:00

I want to understand what is the trade-of/downside of using TransactionScopeOption.RequiresNew on EntityFramework (w/ Sql Server 2008

2条回答
  •  被撕碎了的回忆
    2021-01-01 19:52

    I just wanted to add here that in a couple certain cases the method i've written is inside a parent transaction scope that may or may not be closed with scope.Complete() in these cases I didn't want to be dependent on the parent transaction so we needed to set RequiresNew.

    In general though I agree it's not necessary and should use read committed.

    http://msdn.microsoft.com/en-us/library/ms172152(v=vs.90).aspx

提交回复
热议问题