phronCare/Core/Services/AdjustmentReasonService.cs
Leandro Hernan Rojas f1bc764bbf
All checks were successful
CI/CD Pipeline / Build and Deploy with Docker Compose (push) Successful in 6m18s
Add Adjustment, Products & Tags.
Quote Demo v1
2025-05-05 22:50:02 -03:00

33 lines
1015 B
C#

using Core.Interfaces;
using Domain.Entities;
using Models.Interfaces;
using System.Reflection;
namespace Core.Services
{
public class AdjustmentReasonService:IAdjustmentReasonDom
{
#region Declaraciones y Constructor
private readonly IPhSAdjustmentReasonRepository _repository;
public AdjustmentReasonService(IPhSAdjustmentReasonRepository repository)
{
_repository = repository ?? throw new ArgumentNullException(nameof(repository));
}
#endregion
#region Metodos de clase
public async Task<IEnumerable<EAdjustmentReason>> GetAllActiveAsync()
{
try
{
return await _repository.GetAllActiveAsync();
}
catch (Exception ex)
{
var methodName = MethodBase.GetCurrentMethod()?.Name ?? "UnknownMethod";
throw new Exception($"{methodName} Message: {ex.Message}", ex);
}
}
#endregion
}
}