Beispiel #1
0
        public IActionResult SearchArtsitSubmit(SearchArtist searchArtist)
        {
            var result      = aartistRepository.SearchArtsit(searchArtist.City, searchArtist.TimeEvent, (Enums.EventType)searchArtist.TypeEvent, (Enums.ArtistType)searchArtist.TypeArtist);
            var cardsArtits = aartistRepository.GetCardsArtistByListId(result);


            List <Artis> a1 = (cardsArtits.Select(item => new Artis
            {
                Id = item.Id,
                FullName = item.FullName,
                Description = item.Description,
                Price = item.Price,
                IimagePath = Convert.ToBase64String(item.Image)
            })).ToList();

            ViewData["DateSerach"]    = searchArtist.TimeEvent;
            ViewData["DateSerachAll"] = searchArtist;

            return(View("ResultArtist", a1));
        }
 internal static Song ConvertToSong(SearchArtist.SearchArtistResult song)
 {
     return new Song
     {
         Id = song.SongID.ToString(),
         Name = song.Name,
         Provider = ProviderName,
         Artist = new Artist
         {
             Id = song.ArtistID.ToString(),
             Name = song.ArtistName
         },
         Album = new Album
         {
             Id = song.AlbumID.ToString(),
             Provider = ProviderName,
             Name = song.AlbumName,
             CoverArt = "http://images.grooveshark.com/static/albums/90_" + song.AlbumID + ".jpg"
         },
         TotalSeconds = (int)song.EstimateDuration
     };
 }