public List<Product> GetProductsByCategory(Category category)
 {
     var query = from p in products
         where p.category.Name == category.Name
         select p;
     return query.ToList();
 }
Example #2
0
 public Product( Category category,String name)
 {
     this.category=category;
     this.Name=name;
 }
Example #3
0
 public Product( Category category)
 {
     this.category=category;
     this.Name="dummy";
 }