public List <SqlParameter> GetComputerAccessoriesParameters(ComputerAccessoriesSelector computerAccessoriesSelector)
        {
            List <SqlParameter> sqlParameters = new List <SqlParameter>();

            sqlParameters.AddRange(GetComputerTechnologiesParameters(computerAccessoriesSelector));
            return(sqlParameters);
        }
示例#2
0
        public async Task <List <GoodCellModel> > SearchComputerAccessoriesGoodCells(ComputerAccessoriesSelector computerAccessoriesSelector)
        {
            var normalParameters = _parametersCreator.GetComputerAccessoriesParameters(computerAccessoriesSelector)
                                   .Append(_parametersCreator.CreateDiscriminatorParameter <ComputerAccessory>()).ToArray();
            var goodsDbInformation = await _context.GetGoodsDbInformation("GetComputerAccessories", normalParameters);

            return(goodsDbInformation.GoodCells);
        }
示例#3
0
 public ComputerAccessoriesInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher,
                                                      IGoodCellsSearcher goodCellsSearcher,
                                                      ICacheKeyCreator keyCreator,
                                                      ComputerAccessoriesSelector computerAccessoriesSelector)
 {
     _goodsInformationSearcher = goodsInformationSearcher;
     _goodCellsSearcher        = goodCellsSearcher;
     _keyCreator = keyCreator;
     _computerAccessoriesSelector = computerAccessoriesSelector;
 }
示例#4
0
        public async Task <GoodsInformation <string> > SearchComputerAccessoriesInformation(ComputerAccessoriesSelector computerAccessoriesSelector)
        {
            var normalParameters = _parametersCreator.GetComputerAccessoriesParameters(computerAccessoriesSelector)
                                   .Append(_parametersCreator.CreateDiscriminatorParameter <ComputerAccessory>()).ToArray();
            var goodsDbInformation = await _context.GetGoodsDbInformation("GetComputerAccessories", normalParameters);

            var questions = _questionsGrouper.GroupComputerAccessories(computerAccessoriesSelector, goodsDbInformation.DBQuestions);

            return(new GoodsInformation <string>(_parametersCreator.GetCount(normalParameters), goodsDbInformation.GoodCells, questions));
        }
 public async Task <GoodsInformation <string> > GetComputerAccessoriesInformation([FromBody] ComputerAccessoriesSelector computerAccessoriesSelector)
 {
     return(await _goodsInformationCreator.CreateGoodsInformation(computerAccessoriesSelector, new ComputerAccessoriesInformationSearcherFactory(_goodsInformationSearcher, _goodCellsSearcher, _keyCreator, computerAccessoriesSelector)));
 }
示例#6
0
 public List <QuestionsBase <string> > GroupComputerAccessories(ComputerAccessoriesSelector computerAccessoriesSelector, List <DBQuestionBase> dBQuestions)
 {
     return(GroupComputerTechnologies(computerAccessoriesSelector, dBQuestions));
 }