コード例 #1
0
        /// <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);
        }
コード例 #4
0
 /// <summary>
 /// Deprecated Method for adding a new object to the IngredientDescriptionTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToIngredientDescriptionTypes(IngredientDescriptionType ingredientDescriptionType)
 {
     base.AddObject("IngredientDescriptionTypes", ingredientDescriptionType);
 }
コード例 #5
0
 /// <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;
 }
コード例 #6
0
 /// <summary>
 /// Deprecated Method for adding a new object to the IngredientDescriptionTypes EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToIngredientDescriptionTypes(IngredientDescriptionType ingredientDescriptionType)
 {
     base.AddObject("IngredientDescriptionTypes", ingredientDescriptionType);
 }