/// <summary> /// Retourne toutes les absences /// </summary> /// <returns>Liste d'entités <see cref="Absence"/></returns> public List <Absence> GetAllAbsences() { AbsenceQuery query = new AbsenceQuery(monContexte); List <Absence> result = query.GetAll(); return(result); }
public JsonResult GetLatestAbsences() { var absences = absenceQuery.GetAll().OrderBy(a => a.DateAbsence).Take(5).ToList(); return(Json(JsonConvert.SerializeObject(absences, Formatting.Indented, new JsonSerializerSettings { ReferenceLoopHandling = ReferenceLoopHandling.Ignore }), JsonRequestBehavior.AllowGet)); }
/// <summary> /// Récupérer une liste d'absence en base /// </summary> /// <returns>Liste de Absence</returns> public List <Absence> GetAllAbsence() { AbsenceQuery aq = new AbsenceQuery(contexte); return(aq.GetAll().ToList()); }