コード例 #1
0
        public IActionResult Post([FromBody] HospitalAppointmentRatingModel param)
        {
            AssignModelState();
            var result = _ratingService.Create(param);

            if (result.Success)
            {
                return(Ok(result.Item));
            }
            else
            {
                return(BadRequest(result.Message));
            }
        }
コード例 #2
0
        public IActionResult UpdateRating(int id, [FromBody] HospitalAppointmentRatingModel param)
        {
            AssignModelState();
            param.Id = id;
            var response = _ratingService.Edit(param);

            if (response.Success)
            {
                return(Ok(response.Item));
            }
            else
            {
                return(BadRequest(response.Message));
            }
        }