Esempio n. 1
0
 public ActionResult <PersonCreateDTO> PersonDelete(PersonUpdateDTO facu)
 {
     try
     {
         return(Ok(SqlPersonsRepository.PersonDelete(facu.id)));
     }
     catch (DatabaseException)
     {
         return(StatusCode(500));
     }
 }
Esempio n. 2
0
 public ActionResult <PersonUpdateDTO> PersonUpdate(PersonUpdateDTO facu)
 {
     try
     {
         return(Ok(SqlPersonsRepository.PersonUpdate(facu.id, facu.dni, facu.first_name, facu.last_name)));
     }
     catch (DatabaseException)
     {
         return(StatusCode(500));
     }
 }
Esempio n. 3
0
 public ActionResult <IEnumerable <Person> > GetAllPersons()
 {
     try
     {
         return(Ok(SqlPersonsRepository.GetAllPersons()));
     }
     catch (DatabaseException)
     {
         return(StatusCode(500));
     }
 }
Esempio n. 4
0
        public ActionResult <PersonCreateDTO> PersonRegister(PersonCreateDTO facu)
        {
            try
            {
                //var facultyModel = _mapper.Map<Faculty>(facu);

                return(Ok(SqlPersonsRepository.PersonRegister(facu.dni, facu.first_name, facu.last_name)));
            }
            catch (DatabaseException)
            {
                return(StatusCode(500));
            }
        }