Ejemplo n.º 1
0
        public async Task <List <GoodCellModel> > SearchLaptopGoodCells(LaptopsSelector laptopsSelector)
        {
            var parameters = _parametersCreator.GetLaptopsParameters(laptopsSelector)
                             .Append(_parametersCreator.CreateDiscriminatorParameter <Laptop>()).ToArray();
            var goodsDbInformation = await _context.GetGoodsDbInformation("GetLaptops", parameters);

            return(goodsDbInformation.GoodCells);
        }
Ejemplo n.º 2
0
        public async Task <GoodsInformation <string> > SearchLaptopsInformation(LaptopsSelector laptopsSelector)
        {
            var parameters = _parametersCreator.GetLaptopsParameters(laptopsSelector)
                             .Append(_parametersCreator.CreateDiscriminatorParameter <Laptop>()).ToArray();
            var goodsDbInformation = await _context.GetGoodsDbInformation("GetLaptops", parameters);

            var questions = _questionsGrouper.GroupLaptops(laptopsSelector, goodsDbInformation.DBQuestions);

            return(new GoodsInformation <string>(_parametersCreator.GetCount(parameters), goodsDbInformation.GoodCells, questions));
        }