Example #1
0
        public async Task <bool> CreateAsync(Exeption model)
        {
            _applicationContext.Exeptions.Add(model);

            await SaveAsync();

            return(true);
        }
Example #2
0
        public Task OnExceptionAsync(ExceptionContext context)
        {
            Exeption exeption = new Exeption
            {
                ExeptionId      = Guid.NewGuid().ToString().Substring(8),
                ActionNmae      = context.ActionDescriptor.DisplayName,
                ExeptionMessage = context.Exception.Message,
                ExeptionStack   = context.Exception.StackTrace,
            };

            context.Result = new ContentResult
            {
                Content     = exeption.ExeptionMessage,
                ContentType = "application/json",
                StatusCode  = 400
            };


            _exeptionLogger.Logger(exeption);

            return(Task.CompletedTask);
        }
 public QueryContinueEventArgs(string failedFile, Exeption failure)
 {
     FailedFile = failedFile;
     Failure    = failure;
     Continue   = false;
 }
Example #4
0
 void ILogger <Exeption> .Logger(Exeption model)
 {
     _exeptionRepository.CreateAsync(model).ConfigureAwait(false).GetAwaiter();
     _exeptionRepository.SaveAsync().ConfigureAwait(false).GetAwaiter();
 }
Example #5
0
 public Task <bool> UpdateAsync(Exeption model)
 {
     throw new System.NotImplementedException();
 }