コード例 #1
0
        public async Task <Response <IEnumerable <GameDto> > > GetAll(int offset, int limit)
        {
            var response = new Response <IEnumerable <GameDto> >();

            try
            {
                var result = await _gameDomainService.ReadAllAsync(offset, limit);

                return(response.SetResult(_mapper.Map <IEnumerable <GameDto> >(result)));
            }
            catch (Exception ex)
            {
                Console.Write(ex.Message);
                return(response.SetInternalServerError(Resources.UnexpectedErrorWhileGettingGame));
            }
        }