Skip to content

是否可以让UseTransactionAttribute 可使用在 类上,让类里面所有方法都默认使用事务 #105

Description

@XiaoHeitu

SmartSql version

4.1.25

Database provider and version

Steps to reproduce

Expected result

namespace SmartSql.DyRepository.Annotations
{
[AttributeUsage(AttributeTargets.Method||AttributeTargets.Class, AllowMultiple = false)]
public class UseTransactionAttribute : Attribute
{
public IsolationLevel Level { get; set; } = IsolationLevel.Unspecified;
}
}

Actual result

namespace SmartSql.DyRepository.Annotations
{
[AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
public class UseTransactionAttribute : Attribute
{
public IsolationLevel Level { get; set; } = IsolationLevel.Unspecified;
}
}

Stack trace

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions