private static List <ProductModel> getProducts() { var products = (from p in ProductProcessor.GetProducts() select new ProductModel { id = p.id, product_title = p.product_title, description = p.description, price = p.price, availability = p.availability, specs = p.specs, popularity = p.popularity, imagePath = p.imagePath }).ToList(); return(products); }
// GET: api/Product //gets all existing producsts public List <ProductModel> Get() { return(ProductProcessor.GetProducts()); }
private async Task GetList() { List <Product> products = await _productPrecessor.GetProducts(); dataGridView1.DataSource = products.ToList(); }