public NapsterController() { artistRepo = new ArtistRepo(); albumRepo = new AlbumRepo(); genreRepo = new GenreRepo(); trackRepo = new TrackRepo(); }
void registerNewArtist(ArtistRepo ap) { Console.Clear(); artist.Name = getinput("Please register to continue. What is your name?"); artist.Location = getinput("What Country are you in?"); artist.Biography = getinput("What is your biography?"); Console.WriteLine($"Thank you for registering! your artist id is: {artist.Id}"); ap.Save(artist); }
public void submitArt() { Console.Clear(); if (active != "artist") { insub = true; Console.WriteLine("please enter your artist Id"); artist = new mod.Artist(); active = "artist"; string userinput = Console.ReadLine(); try { artist.Id = int.Parse(userinput); } catch { artist.Name = userinput; } ArtistRepo ap = new ArtistRepo(_context, new ArtistMapper()); artist = ap.AddArtist(artist); if (artist.Name != null) { Console.WriteLine($"welcome {artist.Name}"); viewProfile(); } else { registerNewArtist(ap); } } insub = true; while (insub) { subMenu(); } }
public Albums() { repo = new AlbumRepo(); repoArtist = new ArtistRepo(); tracks = new Tracks(); }
public ArtistServImpl() { artistRepo = Factory.getInstance().getArtistRepo(); }
public Artists() { repo = new ArtistRepo(); repo2 = new ArtistGenreRepo(); }