コード例 #1
0
ファイル: RentController.cs プロジェクト: cmarin45/RentCars
        public async Task <ActionResult <RentModel[]> > Get(bool includePrice = false)
        {
            try
            {
                var results = await _repository.GetAllRentsAsync(includePrice);

                return(_mapper.Map <RentModel[]>(results));
            }
            catch (Exception)
            {
                return(this.StatusCode(StatusCodes.Status500InternalServerError, "Database Fail"));
            }
        }