public void Save(Product product)
 {
     if (product.CategoryID == 0)
         product.CategoryID = 1;
     if (product.ProductID == 0)
         context.Products.Add(product);
     else
     {
         context.Entry(product).State = System.Data.EntityState.Modified;
     }
     context.SaveChanges();
 }
 public void Delete(Product product)
 {
     context.Products.Remove(product);
     context.SaveChanges();
 }