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

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