Пример #1
0
        public ActionResult Edit([Bind(Include = "Guid,Title,Body")] WikiModel model)
        {
            if (ModelState.IsValid)
            {
                var db = new DataAccess();

                try
                {
                    db.EditPage(model.Guid, model.Title, model.Body);
                }
                catch (Exception ex)
                {
                    ViewBag.Error = ex.Message;

                    return View("Error");
                }

                return RedirectToAction("Index");
            }

            return View(model);
        }