예제 #1
0
        public ActionResult Create(Request request)
        {
            if (ModelState.IsValid)
            {
                db.Requests.Add(request);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(request);
        }
예제 #2
0
 public ActionResult Edit(Request request)
 {
     if (ModelState.IsValid)
     {
         db.Entry(request).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(request);
 }