public ActionResult Create(Flow flow) { if (ModelState.IsValid) { flow.ID = Guid.NewGuid(); db.Flows.Add(flow); db.SaveChanges(); return RedirectToAction("Index"); } return View(flow); }
public ActionResult Edit(Flow flow) { if (ModelState.IsValid) { db.Entry(flow).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(flow); }