Exemplo n.º 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;
        }
Exemplo n.º 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);
        }
Exemplo n.º 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);
        }
Exemplo n.º 4
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;
        }