Esempio n. 1
0
 public NapsterController()
 {
     artistRepo = new ArtistRepo();
     albumRepo  = new AlbumRepo();
     genreRepo  = new GenreRepo();
     trackRepo  = new TrackRepo();
 }
Esempio n. 2
0
 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);
 }
Esempio n. 3
0
        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();
            }
        }
Esempio n. 4
0
 public Albums()
 {
     repo = new AlbumRepo(); repoArtist = new ArtistRepo(); tracks = new Tracks();
 }
Esempio n. 5
0
 public ArtistServImpl()
 {
     artistRepo = Factory.getInstance().getArtistRepo();
 }
Esempio n. 6
0
 public Artists()
 {
     repo = new ArtistRepo(); repo2 = new ArtistGenreRepo();
 }