Ejemplo n.º 1
0
        public ActionResult Edit(string id)
        {
            // TODO: to retrieve the model from the data store
            var model = new Post();

            return View(model);
        }
Ejemplo n.º 2
0
        public ActionResult Edit(Post model)
        {
            if (!ModelState.IsValid)
            {
                return View(model);
            }

            // TODO: update model in data store

            return RedirectToAction("Index");
        }
Ejemplo n.º 3
0
        public ActionResult Create()
        {
            var model = new Post();

            return View(model);
        }