Admin.Core/src/platform/ZhonTai.Admin/Core/Attributes/TransactionAttribute.cs
(完整代码) 739Busing FreeSql;
using System;
using System.Data;
namespace ZhonTai.Admin.Core.Attributes;
/// <summary>
/// 启用事务
/// </summary>
[AttributeUsage(AttributeTargets.Method, Inherited = true)]
public class TransactionAttribute : Attribute
{
/// <summary>
/// 事务传播方式
/// </summary>
public Propagation Propagation { get; set; } = Propagation.Required;
/// <summary>
/// 事务隔离级别
/// </summary>
public IsolationLevel IsolationLevel { get; set; }
/// <summary>
/// 数据库注册键
/// </summary>
public string DbKey { get; set; }
public TransactionAttribute()
{
}
public TransactionAttribute(string dbKey)
{
DbKey = dbKey;
}
}
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
