From e80a917a2b1ac4fb765125c5075a5d1d1c44c769 Mon Sep 17 00:00:00 2001 From: Leandro Hernan Rojas Date: Thu, 3 Apr 2025 19:57:32 -0300 Subject: [PATCH] Add Patch 7 in API --- Core/Services/AccountTypeService.cs | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/Core/Services/AccountTypeService.cs b/Core/Services/AccountTypeService.cs index dca9d09..9462332 100644 --- a/Core/Services/AccountTypeService.cs +++ b/Core/Services/AccountTypeService.cs @@ -27,9 +27,17 @@ namespace Core.Services } } - public Task GetByNameAsync(string name) + public async Task GetByNameAsync(string name) { - throw new NotImplementedException(); + try + { + return await _repository.GetByNameAsync(name); + } + catch (Exception ex) + { + var methodName = MethodBase.GetCurrentMethod()?.Name ?? "UnknownMethod"; + throw new Exception($"{methodName} Message: {ex.Message}", ex); + } } } }