wx
2022-02-18 b62ffe3c3a19aa7f2232c72d5fd81e893841c421
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
using SqlSugar;
 
namespace ZTICInterface.Core.Extend;
 
public class TranReturn
{
    /// <summary>
    /// 事务返回
    /// </summary>
    /// <typeparam name="TR"></typeparam>
    /// <param name="result"></param>
    /// <returns></returns>
    public static TR Return<TR>(DbResult<TR> result)
    {
        if (!result.IsSuccess)
            throw result.ErrorException;
        return result.Data;
    }
}