コード例 #1
0
        public async Task <ActionResult <RatingModel[]> > Get()
        {
            try
            {
                var results = await _repository.GetAllRatingsAsyc();

                return(_mapper.Map <RatingModel[]>(results));
            }
            catch (Exception ex)
            {
                return(StatusCode(StatusCodes.Status500InternalServerError, ex.Message));
            }
        }