public List <SqlParameter> GetComputerPartsParameters(ComputerPartsSelector computerPartsSelector) { List <SqlParameter> sqlParameters = new List <SqlParameter>(); sqlParameters.AddRange(GetComputerTechnologiesParameters(computerPartsSelector)); return(sqlParameters); }
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); }
public ComputerPartsInformationSearcherFactory(IGoodsInformationSearcher goodsInformationSearcher, IGoodCellsSearcher goodCellsSearcher, ICacheKeyCreator keyCreator, ComputerPartsSelector computerPartsSelector) { _goodsInformationSearcher = goodsInformationSearcher; _goodCellsSearcher = goodCellsSearcher; _keyCreator = keyCreator; _computerPartsSelector = computerPartsSelector; }
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)); }
public async Task <GoodsInformation <string> > GetComputerPartsInformation([FromBody] ComputerPartsSelector computerPartsSelector) { return(await _goodsInformationCreator.CreateGoodsInformation(computerPartsSelector, new ComputerPartsInformationSearcherFactory(_goodsInformationSearcher, _goodCellsSearcher, _keyCreator, computerPartsSelector))); }
public List <QuestionsBase <string> > GroupComputerParts(ComputerPartsSelector computerPartsSelector, List <DBQuestionBase> dBQuestions) { return(GroupComputerTechnologies(computerPartsSelector, dBQuestions)); }