public IActionResult GetAllPersons() { StaffRepositary staffRepository = new StaffRepositary(); staffRepository = new StaffRepositary(); return(Ok(staffRepository.GetAll())); }
public IActionResult AddStaff([FromBody] Staff staff) { StaffRepositary personRepository = new StaffRepositary(); var p = personRepository.Add(staff); return(Ok(p)); }
public IActionResult GetPersonById(int staffId) { StaffRepositary staffRepository = new StaffRepositary(); return(Ok(staffRepository.GetById(staffId))); }