phronCare/Models/Repositories/PhSAdjustmentReasonRepository.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

26 lines
861 B
C#

using Domain.Entities;
using Microsoft.EntityFrameworkCore;
using Models.Helpers;
using Models.Interfaces;
using Models.Models;
namespace Models.Repositories
{
public class PhSAdjustmentReasonRepository(PhronCareOperationsHubContext context) : IPhSAdjustmentReasonRepository
{
#region Declaraciones y Constructor
private readonly PhronCareOperationsHubContext _context = context;
#endregion
#region Metodos de clase
public async Task<IEnumerable<EAdjustmentReason>> GetAllActiveAsync()
{
var adjustement= await _context.PhSAdjustmentReasons
.Where(x => x.Active)
.OrderBy(x => x.Code)
.ToListAsync();
return adjustement.Select(EntityMapper.MapEntity<PhSAdjustmentReason, EAdjustmentReason>);
}
#endregion
}
}