public ActionResult Create(CLAN clan) { if (ModelState.IsValid) { clan.CL_FCREACION = DateTime.Now; if (clan.CL_PRIV == null) { clan.CL_PRIV = false; } db.CLAN.Add(clan); db.SaveChanges(); return RedirectToAction("Index"); } return View(clan); }
public ActionResult Edit(CLAN clan) { if (ModelState.IsValid) { db.Entry(clan).State = EntityState.Modified; db.SaveChanges(); return RedirectToAction("Index"); } return View(clan); }