public IEnumerable <Supplier> GetListSupplierByType(string type) { var products = productGateway.GetAll(); var types = productTypeGateway.GetAll(); var suppliers = supplierGateway.GetAll(); var result = new List <Supplier>(); foreach (var item in types) { if (item.TypeName == type) { foreach (var prod in item.Products) { if (item.ID == prod.Type_id) { result.Add(prod.Supplier); } } } } return(result); }
// GET: api/Products public IEnumerable <Product> Get() { return(_productGateway.GetAll()); }
public DataTable GetAll() { return(dt = aProductGateway.GetAll()); }
public List <Product> GetAll() { return(_productGateway.GetAll()); }