Exemple #1
0
        public ActionResult Content(ContentAdminModel model)
        {
            if (ModelState.IsValid)
            {
                using (var db = new DataDBContext())
                {
                    var target = db.Items.Find(model.ContentId);
                    target.Content01 = model.Body;
                    db.SaveChanges();
                }
            }

            return View(model);
        }
Exemple #2
0
        public ActionResult About()
        {
            var model = new ContentAdminModel();

            using (var db = new DataDBContext())
            {
                var about = db.Items.Find("795D793B-2F0B-47C2-A22E-C9AC099DDDAF");
                model.ContentId = about.ItemId;
                model.Body = about.Content01;
            }

            return View(model);
        }