Nueva mejoras Y estabilidad

This commit is contained in:
2025-12-26 22:27:20 -06:00
parent 203859b22a
commit ac96cb1f23
23 changed files with 1841 additions and 480 deletions

View File

@@ -0,0 +1,35 @@
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);
}
}