public IActionResult PostSpecialty(Specialty data) { try { var res = _repository.AddSpecialty(data); if (res == -1) { return(Conflict(409)); } return(Ok(res)); } catch (Exception error) { return(BadRequest(error)); } }