public IActionResult GetStudentsByRepresentative(Guid id) { var alumnos = _alumnoBussiness.GetEntitiesByRepresentative(id, true); if (alumnos == null) { return(NotFound()); } return(Ok(alumnos)); }
public IActionResult GetPaymentsByRepresentative(Guid id) { var alumnos = _alumnoBussiness.GetEntitiesByRepresentative(id, false); List <PagoMasterViewModel> pagoMasters = new List <PagoMasterViewModel>(); foreach (var item in alumnos) { var pagos = _pagoMasterBussiness.GetEntitiesByStudent(item.Id); foreach (var pago in pagos) { pagoMasters.Add(pago); } } return(Ok(pagoMasters)); }