// GET: Genre
        public ActionResult Index()
        {
            var painters = _painterUtil.GetPainters();
            var model    = painters.Select(Mapper.Map <PainterViewModel>).ToList();

            return(View(model));
        }
Exemple #2
0
        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));
        }