public ActionResult <PersonCreateDTO> PersonDelete(PersonUpdateDTO facu) { try { return(Ok(SqlPersonsRepository.PersonDelete(facu.id))); } catch (DatabaseException) { return(StatusCode(500)); } }
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)); } }
public ActionResult <IEnumerable <Person> > GetAllPersons() { try { return(Ok(SqlPersonsRepository.GetAllPersons())); } catch (DatabaseException) { return(StatusCode(500)); } }
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)); } }