コード例 #1
0
        public AddArtistToShowModel GetAddArtistToShowModel(int showID)
        {
            // takes in a show ID from clicking "add artist" button on detail or list view and an empty model
            var showService = new ShowService();
            var showDetail  = showService.GetShowByID(showID);

            return(new AddArtistToShowModel()
            {
                ShowID = showDetail.ShowID,
                ShowName = showDetail.ShowName,
                VenueName = showDetail.Venue.VenueName,
                ListOfArtist = showDetail.ListOfArtist
            });
        }
コード例 #2
0
        public List <ShowDetail> GetShowDetailsArtistHasPlayed(int artistID)
        {
            var showService = new ShowService();
            var asdService  = new ArtistShowDataService();
            // var showService = new ShowService();
            var listOfShows          = new List <ShowDetail>();
            var ListOfArtistShowData = asdService.GetArtistShowData();

            foreach (var item in ListOfArtistShowData)
            {
                if (item.ArtistID == artistID)
                {
                    var show = showService.GetShowByID(item.ShowID);

                    listOfShows.Add(show);
                }
            }
            return(listOfShows);
        }