public IActionResult AddDoctor(Doctor doctor) { string message = _context.AddDoctor(doctor); if (message.Equals("Lekarz zostaĆ dodany do bazy danych")) { return(Ok(message)); } return(BadRequest(400 + message)); }
public IActionResult AddDoctor([FromBody] Doctor doctor) { var newDoctor = hospitalDbService.AddDoctor(doctor); return(Ok(newDoctor)); }