private CourseEntryViewModel GetCourseEntryViewModel() { var entryViewModel = new CourseEntryViewModel { Organizations = _orgManager.GetAllSelectListOrganizations("") }; return(entryViewModel); }
public ActionResult Entry(CourseEntryViewModel courseEntryVm) { if (ModelState.IsValid) { var course = Mapper.Map <Course>(courseEntryVm); course.Tags = _courseManager.GetSelectedTags(courseEntryVm.SelectedTags); if (!_courseManager.IsCourseSaved(course)) { return(RedirectToAction("Error")); } return(RedirectToAction("Edit", new { id = course.Id })); } return(RedirectToAction("Error")); }