// GET: Course public ActionResult Entry() { var model = new CourseEntryVM(); model.OrganizationLookUps = _lookUp.GetOrganizations();; return(View(model)); }
public ActionResult Entry(CourseEntryVM model) { if (ModelState.IsValid) { var course = Mapper.Map <Course>(model); bool isAdded = _courseManager.Add(course); if (isAdded) { return(RedirectToAction("Index")); } } model.OrganizationLookUps = _lookUp.GetOrganizations(); return(View(model)); }