コード例 #1
0
ファイル: RoundsController.cs プロジェクト: ybarrantes/casino
        private async Task <ActionResult <WebApiResponse> > GetPagedResponse(int page)
        {
            IPagedRecords <Round> pagedRecords = await _roundContextCrud.GetPagedRecordsAsync(
                _roundContextCrud.GetQueryableWithFilter(), page, 10);

            pagedRecords.Result = _roundContextCrud.Mapper.Map <List <RoundForBetsShowDTO> >(pagedRecords.Result);

            return(_roundContextCrud.MakeSuccessResponse(pagedRecords));
        }
コード例 #2
0
        public async Task <ActionResult <WebApiResponse> > GetAllUserAccountsPagedRecordsAsync(long userId, int page)
        {
            await AbortOnUserNotExistsAsync(userId);

            SetFilterCrudComponent(userId);

            IQueryable <UserAccountBalance> query = _sqlUserAccountBalanceCrudComponent.GetQueryableWithFilter();

            IPagedRecords <UserAccountBalance> pagedRecords = await _sqlUserAccountBalanceCrudComponent.GetPagedRecordsAsync(query, page, 20);

            pagedRecords.Result = Mapper.Map <List <UserAccountShowDTO> >(pagedRecords.Result);

            return(MakeSuccessResponse(pagedRecords));
        }