public int AddProduct(ProductViewModel viewModel)
 {
     Product product = new Product();
     viewModel.CopyToProduct(product);
     context.Products.AddObject(product);
     context.SaveChanges();
     return product.ProductID;
 }
 public void UpdateProduct(ProductViewModel viewModel)
 {
     Product product = GetProductByID(viewModel.ProductID);
     viewModel.CopyToProduct(product);
     context.SaveChanges();
 }