You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi
if define atribute for interface its not worked for all calass that implemeted its
how can use its for interfaces
public sealed class TransactionScopeAttribute : OnMethodBoundaryAspect
{
public override void OnEntry(MethodExecutionArgs args)
{
args.MethodExecutionTag = new TransactionScope();
}
public override void OnExit(MethodExecutionArgs args)
{
var transactionScope = (TransactionScope)args.MethodExecutionTag;
transactionScope.Complete();
transactionScope.Dispose();
}
public override void OnException(MethodExecutionArgs args)
{
var transactionScope = (TransactionScope)args.MethodExecutionTag;
transactionScope.Dispose();
}
}
[TransactionScope]
public interface ISample
{
void Method();
}
public class Sample : ISample
{
public int id { get; set; }
public void Method()
{
Debug.WriteLine("Do some database stuff isolated in surrounding transaction");
}
}
The text was updated successfully, but these errors were encountered:
hi
if define atribute for interface its not worked for all calass that implemeted its
how can use its for interfaces
The text was updated successfully, but these errors were encountered: