Exemplo n.º 1
0
        public async Task OnActionExecutionAsync(
            ActionExecutingContext context,
            ActionExecutionDelegate next)
        {
            var result = await next().ConfigureAwait(false);

            if (result.Exception == null || result.ExceptionHandled)
            {
                await _dbContext.SaveChangesAsync().ConfigureAwait(false);
            }
        }