コード例 #1
0
        /// <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);
        }
コード例 #2
0
 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);
 }
コード例 #3
0
        public ActionResult Create(ProductIngredientLink productingredientlink)
        {
            if (ModelState.IsValid)
            {
                db.ProductIngredientLinks.AddObject(productingredientlink);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(productingredientlink);
        }
コード例 #4
0
 /// <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);
 }
コード例 #5
0
 /// <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;
 }
コード例 #6
0
 /// <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);
 }