public ActionResult Add(FacultyFormViewModel facultyFormViewModel) { if (!ModelState.IsValid) { var universitiesInDb = _universityService.GetUniversities(); facultyFormViewModel.UniversityDtos = Mapper.Map <IEnumerable <University>, IEnumerable <UniversityDto> >(universitiesInDb); return(View(facultyFormViewModel)); } var faculty = Mapper.Map <FacultyDto, Faculty>(facultyFormViewModel.FacultyDto); _facultyService.CreateFacultyWithUniversity(faculty, facultyFormViewModel.UniversityId); return(RedirectToAction("List")); }