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