Esempio n. 1
0
        /// <summary>
        /// Gets the paginated products list.
        /// </summary>
        /// <param name="cmd"></param>
        /// <returns></returns>
        public Task <IEnumerable <ProductDto> > GetProducts(PaginatedRequestCommand cmd)
        {
            IEnumerable <Product> stores = _ctx.Products.ToArray();

            return(Task.FromResult(stores.Select(x => new ProductDto {
                Id = x.Id, StoreId = x.StoreId, Name = x.Name
            })));
        }
 /// <summary>
 /// Gets the paginated products list.
 /// </summary>
 /// <param name="cmd"></param>
 /// <returns></returns>
 public Task<IEnumerable<ProductDto>> GetProducts(PaginatedRequestCommand cmd)
 {
     IEnumerable<Product> stores = _ctx.Products.ToArray();
     return Task.FromResult(stores.Select(x => new ProductDto { Id = x.Id, StoreId = x.StoreId, Name = x.Name }));
 }