public IActionResult AddFaculty([FromBody] FacultyModel faculty) { if (FacultyRepo.Add(faculty)) { return(Ok($"{faculty.name} has been successfully added to faculty.")); } return(BadRequest("This member of faculty already exists.")); }
public ActionResult AddFaculty([FromBody] Faculty f) { if (FacultyRepo.Add(f)) { return(Ok("Faculty has been successfully added")); } return(BadRequest("The Faculty has already been added")); }