public async Task SaveItemAsync(TItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException(nameof(item));
     }
     await _next.SaveItemAsync(item);
 }
示例#2
0
 public async Task SaveItemAsync(TItem item)
 {
     if (item == null)
     {
         throw new ArgumentNullException(nameof(item));
     }
     if (!_validator.Validate(item, out var errorDictionary))
     {
         throw new BadRequestHttpException(errorDictionary);
     }
     await _next.SaveItemAsync(item);
 }