示例#1
0
        public ActionResult Delete(int id)
        {
            if (!_rabbitService.RabbitFactExists(id))
            {
                return(StatusCode(StatusCodes.Status400BadRequest, "The rabbit could not be found"));
            }

            _rabbitService.DeleteRabbit(id);
            return(StatusCode(StatusCodes.Status200OK, $"The rabbit has been deleted."));
        }