public ActionResult AddStaff([FromBody] Staff s) { if (StaffRepo.Add(s)) { return(Ok("Staff has been successfully added")); } return(BadRequest("The Staff has already been added")); }
public IActionResult AddStaff([FromBody] StaffModel staff) { if (StaffRepo.Add(staff)) { return(Ok($"Successfully added {staff.name} to staff.")); } else { return(BadRequest("This member of staff already exists.")); } }