Exemplo n.º 1
0
        /// <summary>
        /// return list of all products
        /// </summary>
        /// <returns></returns>
        public IList <IProductDTO> GetAllProducts()
        {
            var config = new MapperConfiguration(cfg => cfg.CreateMap <IProduct, IProductDTO>());
            var mapper = config.CreateMapper();

            return(mapper.Map <IList <IProductDTO> >(_productDataAccess.GetProducts()));
        }
Exemplo n.º 2
0
        public Dictionary <string, double> GetProducts()
        {
            Dictionary <string, double> products = _productDataAccess.GetProducts();

            foreach (var namePrice in products)
            {
                products[namePrice.Key] = CalculateSellPrice(namePrice.Value);
            }

            return(products);
        }
Exemplo n.º 3
0
 /// <summary>
 /// Get all products in the data source
 /// </summary>
 /// <returns>Products</returns>
 public IEnumerable <Product> GetProducts()
 {
     return(productDataAccess.GetProducts());
 }
Exemplo n.º 4
0
 public List <ProductInfo> GetProducts(string sqlWhere)
 {
     return(productDataAccess.GetProducts(sqlWhere));
 }
Exemplo n.º 5
0
 public void LoadProducts()
 {
     this.grid_PetShopDB.DataSource = _productRepo.GetProducts();
 }
Exemplo n.º 6
0
 public List <ProductInfo> GetProducts(int pageSize, int pageIndex, string strWhere)
 {
     return(_dataAccess.GetProducts(pageSize, pageIndex, strWhere));
 }
Exemplo n.º 7
0
 public IList <ProductModel> GetProducts()
 {
     return(productDataAccess.GetProducts());
 }
Exemplo n.º 8
0
 public List <Product> GetProducts()
 {
     return(_productData.GetProducts());
 }
Exemplo n.º 9
0
 public PagedList <ProductModel> GetProducts(int pageIndex, int pageSize)
 {
     return(productDataAccess.GetProducts(pageIndex, pageSize));
 }