Files
MIESYSTEM/MieSystem/Services/ExpedienteService.cs
2025-12-26 22:27:20 -06:00

35 lines
712 B
C#

using MicroORM.Interfaces;
using MieSystem.Models;
namespace MieSystem.Services;
public class ExpedienteService
{
private readonly IRepository<Expediente> _repo;
public ExpedienteService(IRepository<Expediente> expe)
{
_repo = expe;
}
public Task<int> SaveAsync(Expediente expediente)
{
return _repo.SaveAsync(expediente);
}
public Task<Expediente?> GetByIdAsync(object id)
{
return _repo.GetByIdAsync(id);
}
public Task<IEnumerable<Expediente>> GetAllAsync()
{
return _repo.GetAllAsync();
}
public Task<IEnumerable<Expediente>> GetActivosAsync()
{
return _repo.GetAllAsync(e=> e.Activo == true);
}
}