示例#1
0
 public ActionResult Edit(Reason model)
 {
     var reason = _context.Reason.First(r => r.Id == model.Id);
     reason.Title = model.Title;
     reason.Text = HttpUtility.HtmlDecode(model.Text);
     _context.SaveChanges();
     return RedirectToAction("Index", "Home", new {area = ""});
 }
示例#2
0
 /// <summary>
 /// Deprecated Method for adding a new object to the Reason EntitySet. Consider using the .Add method of the associated ObjectSet&lt;T&gt; property instead.
 /// </summary>
 public void AddToReason(Reason reason)
 {
     base.AddObject("Reason", reason);
 }
示例#3
0
 /// <summary>
 /// Create a new Reason object.
 /// </summary>
 /// <param name="id">Initial value of the Id property.</param>
 /// <param name="title">Initial value of the Title property.</param>
 /// <param name="text">Initial value of the Text property.</param>
 public static Reason CreateReason(global::System.Int32 id, global::System.String title, global::System.String text)
 {
     Reason reason = new Reason();
     reason.Id = id;
     reason.Title = title;
     reason.Text = text;
     return reason;
 }