コード例 #1
0
 public ActionResult Edit(TicketState ticketstate)
 {
     if (ModelState.IsValid)
     {
         db.Entry(ticketstate).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(ticketstate);
 }
コード例 #2
0
        public ActionResult Create(TicketState ticketstate)
        {
            if (ModelState.IsValid)
            {
                db.TicketState.Add(ticketstate);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(ticketstate);
        }