Пример #1
0
        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));
        }
Пример #2
0
        public IActionResult AddDoctor([FromBody] Doctor doctor)
        {
            var newDoctor = hospitalDbService.AddDoctor(doctor);

            return(Ok(newDoctor));
        }