public List <SqlParameter> GetComputerPartsParameters(ComputerPartsSelector computerPartsSelector)
        {
            List <SqlParameter> sqlParameters = new List <SqlParameter>();

            sqlParameters.AddRange(GetComputerTechnologiesParameters(computerPartsSelector));
            return(sqlParameters);
        }
Exemplo n.º 2
0
        public async Task <List <GoodCellModel> > SearchComputerPartsGoodCells(ComputerPartsSelector computerPartsSelector)
        {
            var normalParameters = _parametersCreator.GetComputerPartsParameters(computerPartsSelector)
                                   .Append(_parametersCreator.CreateDiscriminatorParameter <ComputerPart>()).ToArray();
            var goodsDbInformation = await _context.GetGoodsDbInformation("GetComputerParts", normalParameters);

            return(goodsDbInformation.GoodCells);
        }
Exemplo n.º 3
0
 public ComputerPartsInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher,
                                                IGoodCellsSearcher goodCellsSearcher,
                                                ICacheKeyCreator keyCreator,
                                                ComputerPartsSelector computerPartsSelector)
 {
     _goodsInformationSearcher = goodsInformationSearcher;
     _goodCellsSearcher        = goodCellsSearcher;
     _keyCreator            = keyCreator;
     _computerPartsSelector = computerPartsSelector;
 }
Exemplo n.º 4
0
        public async Task <GoodsInformation <string> > SearchComputerPartsInformation(ComputerPartsSelector computerPartsSelector)
        {
            var normalParameters = _parametersCreator.GetComputerPartsParameters(computerPartsSelector)
                                   .Append(_parametersCreator.CreateDiscriminatorParameter <ComputerPart>()).ToArray();
            var goodsDbInformation = await _context.GetGoodsDbInformation("GetComputerParts", normalParameters);

            var questions = _questionsGrouper.GroupComputerParts(computerPartsSelector, goodsDbInformation.DBQuestions);

            return(new GoodsInformation <string>(_parametersCreator.GetCount(normalParameters), goodsDbInformation.GoodCells, questions));
        }
Exemplo n.º 5
0
 public async Task <GoodsInformation <string> > GetComputerPartsInformation([FromBody] ComputerPartsSelector computerPartsSelector)
 {
     return(await _goodsInformationCreator.CreateGoodsInformation(computerPartsSelector, new ComputerPartsInformationSearcherFactory(_goodsInformationSearcher, _goodCellsSearcher, _keyCreator, computerPartsSelector)));
 }
Exemplo n.º 6
0
 public List <QuestionsBase <string> > GroupComputerParts(ComputerPartsSelector computerPartsSelector, List <DBQuestionBase> dBQuestions)
 {
     return(GroupComputerTechnologies(computerPartsSelector, dBQuestions));
 }