public void Intercept(IInterceptionContext interceptionContext) { using (var trxScope = new TransactionScope()) { interceptionContext.Proceed(); trxScope.Complete(); } }
public void Intercept(IInterceptionContext interceptionContext) { try { interceptionContext.Proceed(); } catch (Exception e) { logger.LogError(e.Message); throw; } logger.Log($"Method {interceptionContext.MethodName} of type {interceptionContext.TargetType.FullName} invoked", LogLevel.All); }
public void Intercept(IInterceptionContext interceptionContext) { if (!unitOfWork.IsStarted) { unitOfWork.Begin(); } try { interceptionContext.Proceed(); } catch { unitOfWork.Rollback(); throw; } unitOfWork.Commit(); }
public void Intercept(IInterceptionContext interceptionContext) { interceptionContext.Proceed(); proxyContainer.DisposeProxies(); }