コード例 #1
0
ファイル: HomeController.cs プロジェクト: fathurxzz/aleqx
 public ActionResult Index()
 {
     using (var context = new SiteContainer())
     {
         MapContent content = context.MapContent.First();
         return View(content);
     }
 }
コード例 #2
0
ファイル: HomeController.cs プロジェクト: fathurxzz/aleqx
 public ActionResult Edit(FormCollection form)
 {
     using (var context = new SiteContainer())
     {
         MapContent content = context.MapContent.First();
         content.Text = HttpUtility.HtmlDecode(form["Text"]);
         context.SaveChanges();
     }
     return RedirectToAction("Index");
 }