Exemplo n.º 1
0
        public ActionResult Create( Assistance assistance)
        {
            if (ModelState.IsValid)
            {
                db.Assistances.Add(assistance);
                db.SaveChanges();
                return RedirectToAction("Index");
            }

            return View(assistance);
        }
Exemplo n.º 2
0
        public ActionResult Edit(Assistance assistance)
        {

            if (ModelState.IsValid)
            {
                db.Entry(assistance).State = EntityState.Modified;
                db.SaveChanges();
                f = 1;
                return RedirectToAction("Create");
            }
            return View(assistance);
        }