예제 #1
0
        public IActionResult GetNextSongs([FromQuery] int Id, [FromQuery] int skip, [FromQuery]  int take)
        {
            var model = new PagingModel <Song>
            {
                PagingList = _songsManager.Get(filter: x => x.Artist.Id == Id,
                                               skip: skip,
                                               take: take,
                                               includeProperties: $"{nameof(Artist)}.{nameof(Artist.User)}").ToList()
            };

            return(View(model));
        }
예제 #2
0
        public IActionResult Edit(long id)
        {
            var query      = _genreManager.List();
            var queryAlbum = _albumManager.List();
            var genres     = query.ToList();
            var albumItems = queryAlbum.ToList();

            var song = _songManager.Get(id).Result;

            ViewData["GenreItems"]  = genres;
            ViewData["AlbumItems"]  = albumItems;
            ViewData["CurrentSong"] = song;
            return(View("~/Views/Song/Edit.cshtml"));
        }