public ActionResult <SectionCreateDTO> SectionStudents(int id_section) { try { return(Ok(SqlSectionsRepository.GetAllStudents(id_section))); } catch (DatabaseException) { return(StatusCode(500)); } }
public ActionResult <SectionCreateDTO> SectionDelete(SectionUpdateDTO s) { try { return(Ok(SqlSectionsRepository.SectionDelete(s.id))); } catch (DatabaseException) { return(StatusCode(500)); } }
public ActionResult <IEnumerable <Section> > GetAllSections() { try { return(Ok(SqlSectionsRepository.GetAllSections())); } catch (DatabaseException) { return(StatusCode(500)); } }
public ActionResult <InscriptionDTO> SectionUninscription(int id_section, InscriptionDTO ins) { try { return(Ok(SqlSectionsRepository.SectionUninscription(id_section, ins.id_person))); } catch (DatabaseException) { return(StatusCode(500)); } }
public ActionResult <SectionUpdateDTO> SectionUpdate(SectionUpdateDTO s) { try { return(Ok(SqlSectionsRepository.SectionUpdate(s.id, s.uc, s.semester, s.ht, s.hp, s.hl, s.name, s.description, s.type, s.fk_school))); } catch (DatabaseException) { return(StatusCode(500)); } }