コード例 #1
0
 public ActionResult Edit(Good good)
 {
     if (ModelState.IsValid && Good.Update(good))
     {
         return RedirectToAction("Index");
     }
     return View(good);
 }
コード例 #2
0
 /// <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);
 }
コード例 #3
0
 /// <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;
 }