public ActionResult Create(GUIDTestViewModel model)
 {
     if (ModelState.IsValid)
     {
         using (_connection = Utilities.GetOpenConnection())
         {
             _connection.Insert <Guid>(model);
         }
         return(RedirectToAction("index"));
     }
     return(View(model));
 }
Beispiel #2
0
        public ActionResult Edit(GUIDTestViewModel model)
        {
            if (ModelState.IsValid)
            {
                using (_connection = SqlConnectionHelper.GetOpenConnection())
                {
                    _connection.Update(model);
                }
                return(RedirectToAction("index"));
            }

            return(View(model));
        }