/// <summary> /// Create a new IngredientDescription object. /// </summary> /// <param name="ingredientDescriptionID">Initial value of the IngredientDescriptionID property.</param> /// <param name="ingredientID">Initial value of the IngredientID property.</param> /// <param name="ingredientDescriptionTypeID">Initial value of the IngredientDescriptionTypeID property.</param> public static IngredientDescription CreateIngredientDescription(global::System.Int32 ingredientDescriptionID, global::System.Int32 ingredientID, global::System.Int32 ingredientDescriptionTypeID) { IngredientDescription ingredientDescription = new IngredientDescription(); ingredientDescription.IngredientDescriptionID = ingredientDescriptionID; ingredientDescription.IngredientID = ingredientID; ingredientDescription.IngredientDescriptionTypeID = ingredientDescriptionTypeID; return(ingredientDescription); }
public ActionResult Edit(IngredientDescription ingredientdescription) { if (ModelState.IsValid) { db.IngredientDescriptions.Attach(ingredientdescription); db.ObjectStateManager.ChangeObjectState(ingredientdescription, EntityState.Modified); db.SaveChanges(); return RedirectToAction("Index"); } return View(ingredientdescription); }
public ActionResult Create(IngredientDescription ingredientdescription) { if (ModelState.IsValid) { db.IngredientDescriptions.AddObject(ingredientdescription); db.SaveChanges(); return RedirectToAction("Index"); } return View(ingredientdescription); }
/// <summary> /// Deprecated Method for adding a new object to the IngredientDescriptions EntitySet. Consider using the .Add method of the associated ObjectSet<T> property instead. /// </summary> public void AddToIngredientDescriptions(IngredientDescription ingredientDescription) { base.AddObject("IngredientDescriptions", ingredientDescription); }
/// <summary> /// Create a new IngredientDescription object. /// </summary> /// <param name="ingredientDescriptionID">Initial value of the IngredientDescriptionID property.</param> /// <param name="ingredientID">Initial value of the IngredientID property.</param> /// <param name="ingredientDescriptionTypeID">Initial value of the IngredientDescriptionTypeID property.</param> public static IngredientDescription CreateIngredientDescription(global::System.Int32 ingredientDescriptionID, global::System.Int32 ingredientID, global::System.Int32 ingredientDescriptionTypeID) { IngredientDescription ingredientDescription = new IngredientDescription(); ingredientDescription.IngredientDescriptionID = ingredientDescriptionID; ingredientDescription.IngredientID = ingredientID; ingredientDescription.IngredientDescriptionTypeID = ingredientDescriptionTypeID; return ingredientDescription; }