Esempio n. 1
0
        public ActionResult Create(Flow flow)
        {
            if (ModelState.IsValid)
            {
                flow.ID = Guid.NewGuid();
                db.Flows.Add(flow);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(flow);
        }
Esempio n. 2
0
 public ActionResult Edit(Flow flow)
 {
     if (ModelState.IsValid)
     {
         db.Entry(flow).State = EntityState.Modified;
         db.SaveChanges();
         return RedirectToAction("Index");
     }
     return View(flow);
 }