Exemplo n.º 1
0
 public ActionResult Edit(Good good)
 {
     if (ModelState.IsValid && Good.Update(good))
     {
         return RedirectToAction("Index");
     }
     return View(good);
 }
 /// <summary>
 /// Deprecated Method for adding a new object to the Goods EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToGoods(Good good)
 {
     base.AddObject("Goods", good);
 }
 /// <summary>
 /// Create a new Good object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="name">Initial value of the Name property.</param>
 /// <param name="updated_at">Initial value of the Updated_at property.</param>
 public static Good CreateGood(global::System.Int32 id, global::System.String name, global::System.DateTime updated_at)
 {
     Good good = new Good();
     good.Id = id;
     good.Name = name;
     good.Updated_at = updated_at;
     return good;
 }