using System; using Blog.Core.Common.DB; namespace Blog.Core.Common { /// /// 这个Attribute就是使用时候的验证,把它添加到需要执行事务的方法中,即可完成事务的操作。 /// [AttributeUsage(AttributeTargets.Method, Inherited = true)] public class UseTranAttribute : Attribute { /// /// 事务传播方式 /// public Propagation Propagation { get; set; } = Propagation.Required; } }