示例#1
0
        public ActionResult Edit(ContactForm c)
        {
            try
            {
                if (ModelState.IsValid)
                {
                    _service.Update(c.ToModel());

                    return(RedirectToAction("Index"));
                }

                else
                {
                    return(View(c));
                }
            }
            catch
            {
                return(View());
            }
        }