From 15fdfa11ede1fa292fe9268991bb0aaa19a6db0f Mon Sep 17 00:00:00 2001 From: "ai.astrakhantsev" Date: Mon, 27 Feb 2023 11:29:06 +0500 Subject: [PATCH] ArgumentInvalidException --- .../Repository/WellFinalDocumentsRepository.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/AsbCloudInfrastructure/Repository/WellFinalDocumentsRepository.cs b/AsbCloudInfrastructure/Repository/WellFinalDocumentsRepository.cs index fc8e6f0f..ade0ad73 100644 --- a/AsbCloudInfrastructure/Repository/WellFinalDocumentsRepository.cs +++ b/AsbCloudInfrastructure/Repository/WellFinalDocumentsRepository.cs @@ -34,7 +34,7 @@ namespace AsbCloudInfrastructure.Repository public async Task> UpdateRangeAsync(int idWell, IEnumerable? dtos, CancellationToken token) { if (dtos is null) - throw new ArgumentInvalidException("Данные по категориям отсутствуют."); + throw new ArgumentInvalidException("Данные по категориям отсутствуют.", nameof(dtos)); var entities = dtos .Where(dto => dto.IdsPublishers?.Any() == true) @@ -130,7 +130,7 @@ namespace AsbCloudInfrastructure.Repository .FirstOrDefaultAsync(x => x.IdWell == idWell && x.IdCategory == idCategory && x.IdUser == idUser, token); if (entity is null) - throw new ArgumentInvalidException("Пользователь не является ответственным за загрузку файла для данной категории."); + throw new ArgumentInvalidException("Пользователь не является ответственным за загрузку файла для данной категории.", nameof(entity)); var dto = Convert(entity); return dto;