/// <summary> /// wrap Action callback /// </summary> public static void UseDefaultTransactionByAction(this System.Data.IsolationLevel defaultIsolationLevel, Action callback) { UseTransactionByAction(DefaultNewScopeFunc(defaultIsolationLevel.GetTransactionsIsolationLevel(), false), callback); }
/// <summary> /// wrap Func<ReturnInfo> callback, ( 应该使用异常,而不是 ReturnInfo , Func<ReturnInfo> 要改造成 Action) /// </summary> public static ReturnInfo UseDefaultTransactionByReturnInfoFunc(this System.Data.IsolationLevel defaultIsolationLevel, Func <ReturnInfo> callback) { return(UseTransactionByReturnInfoFunc(DefaultNewScopeFunc(defaultIsolationLevel.GetTransactionsIsolationLevel(), false), callback)); }