public ActionResult Create(EmployeeModel collection) { try { if (ModelState.IsValid) { collection.Save(Path); return RedirectToAction("Details", new { id = collection.Id }); } else { return View(); } } catch { return View(); } }
public ActionResult Edit(Guid id, EmployeeModel collection) { try { if (ModelState.IsValid) { collection.Id = id; collection.Save(Path); return RedirectToAction("Details", new { id = collection.Id }); } return View(); } catch { return View(); } }