Ejemplo n.º 1
0
        /// <summary>
        /// Gets the paginated product list by status.
        /// </summary>
        /// <param name="cmd"></param>
        /// <returns></returns>
        public Task <IEnumerable <ProductDto> > GetProducts(ProductsByStatusPaginatedRequestCommand cmd)
        {
            IEnumerable <Product> stores = _ctx.Products.ToArray();

            return(Task.FromResult(stores.Select(x => new ProductDto {
                Id = x.Id, StoreId = x.StoreId, Name = x.Name
            })));
        }
Ejemplo n.º 2
0
 /// <summary>
 /// Gets the paginated product list by status.
 /// </summary>
 /// <param name="cmd"></param>
 /// <returns></returns>
 public Task<IEnumerable<ProductDto>> GetProducts(ProductsByStatusPaginatedRequestCommand cmd)
 {
     IEnumerable<Product> stores = _ctx.Products.ToArray();
     return Task.FromResult(stores.Select(x => new ProductDto { Id = x.Id, StoreId = x.StoreId, Name = x.Name }));
 }