Exemple #1
0
        public List<ProductResponseDto> getProducts(ProductsSearchResponseDto ppResponse)
        {
            // now select the products from the db using the int[] product ids 

            var products = Db.Select<Product>(p => Sql.In(p.Id, ppResponse.Ids));
            var productsListDto = products.ConvertAll(p => p.TranslateTo<ProductResponseDto>());

            return  productsListDto;
        }
Exemple #2
0
        public List <ProductResponseDto> getProducts(ProductsSearchResponseDto ppResponse)
        {
            // now select the products from the db using the int[] product ids

            var products        = Db.Select <Product>(p => Sql.In(p.Id, ppResponse.Ids));
            var productsListDto = products.ConvertAll(p => p.TranslateTo <ProductResponseDto>());

            return(productsListDto);
        }
Exemple #3
0
        public object Get(ProductsSearchDto request)
        {
            // simulate long running service
            System.Threading.Thread.Sleep(1500);

            var response = new ProductsSearchResponseDto
            {
                Ids = new int[] { 1, 3, 5, 7 }
            };

            return(response);
        }
        public object Get(ProductsSearchDto request)
        {
            // simulate long running service
            System.Threading.Thread.Sleep(1500);

            var response = new ProductsSearchResponseDto
            {
                Ids = new int[] { 1, 3, 5, 7 }
            };

            return response;
        }