Пример #1
0
        public ActionResult SingersList(int genresId)
        {
            var             model = GenresEntities.InitialModels().FirstOrDefault(a => a.Id == genresId);
            GenresViewModel mo    = new GenresViewModel()
            {
                genre = model,
                list  = GenresEntities.InitialModels(),
            };

            return(View(mo));
        }
        // GET: Music/MusicTracks
        public ActionResult Index(int id)
        {
            var gen = GenresEntities.InitialModels().FirstOrDefault(a => a.Id == id);

            if (gen == null)
            {
                gen = GenresEntities.InitialModels().First();
            }
            GenresViewModel models = new GenresViewModel()
            {
                genre = gen,
                list  = GenresEntities.InitialModels(),
            };

            return(View(models));
        }
Пример #3
0
        // GET: Music/Album
        public ActionResult Index(int genresId)
        {
            var model = GenresEntities.InitialModels().FirstOrDefault(a => a.Id == genresId);

            if (model == null)
            {
                model = GenresEntities.InitialModels().First();
            }
            GenresViewModel mo = new GenresViewModel()
            {
                genre = model,
                list  = GenresEntities.InitialModels(),
            };

            return(View(mo));
        }
Пример #4
0
        // GET: Music/Singer
        public ActionResult Index()
        {
            var models = GenresEntities.InitialModels();

            return(View(models));
        }