// // GET: /School/ public virtual ActionResult Edit() { var educationOrg = _schoolRepository.GetSchool().EducationOrganization; var schoolModel = new SchoolModel(); _toVmMapper.Map(educationOrg, schoolModel); return View(schoolModel); }
public virtual ActionResult Edit(SchoolModel schoolModel) { if (!ModelState.IsValid) return View(schoolModel); var school = _schoolRepository.GetSchool().EducationOrganization; _toEntityMapper.Map(schoolModel, school); _schoolRepository.Save(); return RedirectToAction(MVC.Home.Index()); }
public void WhenIInputValidDetailsForMySchool() { var salt = Guid.NewGuid(); _schoolModel = new SchoolModel { NameOfInstitution = "Name " + salt, StateOrganizationId = "State " + salt, WebSite = "website " + salt }; _homePage = _schoolPage.Save(_schoolModel); _schoolPage = _homePage.TopMenu.GoToSchoolPage(); _updatedModel = _schoolPage.Read.ModelFromPage(); }