35 lines
712 B
C#
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);
|
|
}
|
|
|
|
} |