/// <summary>
        /// Create a new ProductIngredientLink object.
        /// </summary>
        /// <param name="productIngredientLinkID">Initial value of the ProductIngredientLinkID property.</param>
        /// <param name="productID">Initial value of the ProductID property.</param>
        /// <param name="ingredientID">Initial value of the IngredientID property.</param>
        public static ProductIngredientLink CreateProductIngredientLink(global::System.Int32 productIngredientLinkID, global::System.Int32 productID, global::System.Int32 ingredientID)
        {
            ProductIngredientLink productIngredientLink = new ProductIngredientLink();

            productIngredientLink.ProductIngredientLinkID = productIngredientLinkID;
            productIngredientLink.ProductID    = productID;
            productIngredientLink.IngredientID = ingredientID;
            return(productIngredientLink);
        }
 public ActionResult Edit(ProductIngredientLink productingredientlink)
 {
     if (ModelState.IsValid)
     {
         db.ProductIngredientLinks.Attach(productingredientlink);
         db.ObjectStateManager.ChangeObjectState(productingredientlink, EntityState.Modified);
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(productingredientlink);
 }
        public ActionResult Create(ProductIngredientLink productingredientlink)
        {
            if (ModelState.IsValid)
            {
                db.ProductIngredientLinks.AddObject(productingredientlink);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(productingredientlink);
        }
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductIngredientLinks EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductIngredientLinks(ProductIngredientLink productIngredientLink)
 {
     base.AddObject("ProductIngredientLinks", productIngredientLink);
 }
 /// <summary>
 /// Create a new ProductIngredientLink object.
 /// </summary>
 /// <param name="productIngredientLinkID">Initial value of the ProductIngredientLinkID property.</param>
 /// <param name="productID">Initial value of the ProductID property.</param>
 /// <param name="ingredientID">Initial value of the IngredientID property.</param>
 public static ProductIngredientLink CreateProductIngredientLink(global::System.Int32 productIngredientLinkID, global::System.Int32 productID, global::System.Int32 ingredientID)
 {
     ProductIngredientLink productIngredientLink = new ProductIngredientLink();
     productIngredientLink.ProductIngredientLinkID = productIngredientLinkID;
     productIngredientLink.ProductID = productID;
     productIngredientLink.IngredientID = ingredientID;
     return productIngredientLink;
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the ProductIngredientLinks EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToProductIngredientLinks(ProductIngredientLink productIngredientLink)
 {
     base.AddObject("ProductIngredientLinks", productIngredientLink);
 }