public ActionResult Create(ReportServer reportserver) { if (ModelState.IsValid) { db.ReportServers.Add(reportserver); db.SaveChanges(); return RedirectToAction("Index"); } return View(reportserver); }
public ActionResult Edit(ReportServer reportserver) { if (ModelState.IsValid) { db.Entry(reportserver).State = EntityState.Modified; db.Entry(reportserver).Property(l => l.Password).IsModified = reportserver._passwordSet; db.SaveChanges(); return RedirectToAction("Index"); } return View(reportserver); }