예제 #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;
        }
예제 #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);
        }
예제 #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);
        }
예제 #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;
        }