public ActionResult Create() { var model = new LibrarianVm(); model.GenderListItem = GetGenderList(); return(View(model)); }
public ActionResult Edit(LibrarianVm model) { if (ModelState.IsValid) { var librarians = Mapper.Map <Librarian>(model); bool isUpdate = _librarianManager.Update(librarians); if (isUpdate) { return(RedirectToAction("Index")); } model.GenderListItem = GetGenderList(); } return(View()); }