public RoulettesTypesCrudComponent( IMapper mapper, IPagedRecords <RouletteType> pagedRecords) : base(mapper, pagedRecords) { ShowModelDTOType = typeof(RouletteTypeDTO); }
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)); }
public BetsCrudComponent( IMapper mapper, IPagedRecords <Bet> pagedRecords, IIdentityApp <User> identityApp) : base(mapper, pagedRecords) { _identityApp = identityApp; ShowModelDTOType = typeof(BetShowDTO); }
public AccountTransactionsCrudComponent( IMapper mapper, IPagedRecords <AccountTransaction> pagedRecords, IIdentityApp <User> identityApp) : base(mapper, pagedRecords) { _identityApp = identityApp; ShowModelDTOType = typeof(AccountTransactionShowDTO); }
public UsersCrudComponent( IMapper mapper, IPagedRecords <User> pagedRecords, ISqlContextCrud <UserAccount> userAccountCrud) : base(mapper, pagedRecords) { ShowModelDTOType = typeof(UserShowDTO); _userAccountCrud = userAccountCrud; }
public RoulettesCrudComponent( IIdentityApp <User> identityApp, IMapper mapper, IPagedRecords <Roulette> pagedRecords) : base(mapper, pagedRecords) { QueryFilter = new RoulettesQueryableFilter(); _identityApp = identityApp; ShowModelDTOType = typeof(RouletteShowDTO); }
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)); }
public UserAccountsCrudComponent( IMapper mapper, IPagedRecords <UserAccount> pagedRecords, IIdentityApp <User> identityApp, ISqlContextCrud <UserAccountBalance> sqlUserAccountBalanceContextCrud, ISqlContextCrud <AccountTransaction> sqlAccountTransactionContextCrud) : base(mapper, pagedRecords) { _identityApp = identityApp; _sqlUserAccountBalanceCrudComponent = sqlUserAccountBalanceContextCrud; _sqlAccountTransactionContextCrud = sqlAccountTransactionContextCrud; ShowModelDTOType = typeof(UserAccountShowDTO); _sqlUserAccountBalanceCrudComponent.ShowModelDTOType = typeof(UserAccountShowDTO); }
public RoundsCrudComponent( IMapper mapper, IPagedRecords <Round> pagedRecords, ISqlContextCrud <Roulette> rouletteContext, IIdentityApp <User> identityApp, PlayRoulette playRoulette) : base(mapper, pagedRecords) { _identityApp = identityApp; _playRoulette = playRoulette; ShowModelDTOType = typeof(RoundShowDTO); _rouletteCrudController = rouletteContext; }
public override IPagedRecords <Roulette> MapPagedRecordsToModelDTO(IPagedRecords <Roulette> pagedRecords) { pagedRecords.Result = Mapper.Map <List <RouletteShowDTO> >(pagedRecords.Result); return(pagedRecords); }
public override IPagedRecords <UserAccount> MapPagedRecordsToModelDTO(IPagedRecords <UserAccount> pagedRecords) { pagedRecords.Result = Mapper.Map <List <UserAccountShowDTO> >(pagedRecords.Result); return(pagedRecords); }
public override IPagedRecords <AccountTransaction> MapPagedRecordsToModelDTO(IPagedRecords <AccountTransaction> pagedRecords) { pagedRecords.Result = Mapper.Map <List <AccountTransactionShowDTO> >(pagedRecords.Result); return(pagedRecords); }