// GET: Genre public ActionResult Index() { var genres = _genreUtil.GetGenres(); var model = genres.Select(Mapper.Map <GenreViewModel>).ToList(); return(View(model)); }
public ActionResult CreatePicture() { var model = new PictureViewModel { PainterSelectionList = _painterUtil.GetPainters().Select(x => new SelectListItem { Value = x.PainterId.ToString(CultureInfo.InvariantCulture), Text = x.PainterFullName }).ToList(), DepartamentSelectionList = _departamentUtil.GetDepartaments().Select(x => new SelectListItem { Value = x.DepartamentId.ToString(CultureInfo.InvariantCulture), Text = x.DepartamentName }).ToList(), GenreSelectionList = _genreUtil.GetGenres().Select(x => new SelectListItem { Value = x.GenreId.ToString(CultureInfo.InvariantCulture), Text = x.GenreName }).ToList(), }; return(View(model)); }