From ee126d074c4125be4839104ebdde0da023be787f Mon Sep 17 00:00:00 2001 From: Leandro Hernan Rojas Date: Thu, 10 Apr 2025 19:09:51 -0300 Subject: [PATCH] Update TaxCondition Controller in API --- .../Repositories/PhOhTaxConditionRepository.cs | 16 ++++++++-------- phronCare.API/Program.cs | 2 ++ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/Models/Repositories/PhOhTaxConditionRepository.cs b/Models/Repositories/PhOhTaxConditionRepository.cs index d83cb69..5f878fe 100644 --- a/Models/Repositories/PhOhTaxConditionRepository.cs +++ b/Models/Repositories/PhOhTaxConditionRepository.cs @@ -8,19 +8,19 @@ namespace Models.Repositories { public class PhOhTaxConditionRepository(PhronCareOperationsHubContext context): IPhSTaxConditionRepository { - #region Declaraciones y Constructor + #region Declaraciones y Constructor private readonly PhronCareOperationsHubContext _context = context; - #endregion - #region Metodos de clase - async Task> IPhSTaxConditionRepository.GetAllAsync() + #endregion + #region Metodos de clase + public async Task> GetAllAsync() { - var accountTypes = await _context.PhOhTaxConditions.ToListAsync(); - return accountTypes.Select(EntityMapper.MapEntity); + var taxConditions = await _context.PhOhTaxConditions.ToListAsync(); + return taxConditions.Select(EntityMapper.MapEntity); } public async Task GetByNameAsync(string name) { - var taxDescription = await _context.PhOhTaxConditions.FirstOrDefaultAsync(a => a.Description.Contains(name)); - return taxDescription != null ? EntityMapper.MapEntity(taxDescription) : null; + var taxCondition = await _context.PhOhTaxConditions.FirstOrDefaultAsync(a => a.Description.Contains(name)); + return taxCondition != null ? EntityMapper.MapEntity(taxCondition) : null; } #endregion } diff --git a/phronCare.API/Program.cs b/phronCare.API/Program.cs index d9214ed..c22ff99 100644 --- a/phronCare.API/Program.cs +++ b/phronCare.API/Program.cs @@ -35,6 +35,8 @@ builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); +builder.Services.AddScoped(); +builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped(); builder.Services.AddScoped();