示例#1
0
        public IActionResult DeleteDoctor(int id)
        {
            var succeeded = _service.DeleteDoctor(id);

            if (succeeded)
            {
                return(Ok("Doctor deleted!"));
            }
            else
            {
                return(BadRequest("Bad request! Probably it's the id!"));
            }
        }
示例#2
0
        public async Task <IActionResult> DeleteDoctor(int doctorId)
        {
            await _doctorsService.DeleteDoctor(new DeleteDoctorCommand { DoctorId = doctorId });

            return(NoContent());
        }