1
0

TransactionAttribute.cs 568 B

1234567891011121314151617181920212223
  1. using FreeSql;
  2. using System;
  3. using System.Data;
  4. namespace Admin.Core.Common.Attributes
  5. {
  6. /// <summary>
  7. /// 启用事物
  8. /// </summary>
  9. [AttributeUsage(AttributeTargets.Method, Inherited = true)]
  10. public class TransactionAttribute : Attribute
  11. {
  12. /// <summary>
  13. /// 事务传播方式
  14. /// </summary>
  15. public Propagation Propagation { get; set; } = Propagation.Required;
  16. /// <summary>
  17. /// 事务隔离级别
  18. /// </summary>
  19. public IsolationLevel? IsolationLevel { get; set; }
  20. }
  21. }