Beispiel #1
0
        public Quiz CreateNewQuiz(Song song, string answer1, string answer2, string rightAnswer)
        {
            var quiz = Quiz.Create(song, answer1, answer2, rightAnswer);

            quiz = quizRepository.Add(quiz);
            persistanceContext.SaveChanges();

            return(quiz);
        }
Beispiel #2
0
        public Song CreateNewSong(string artist, string genre, string title, decimal price, string path)
        {
            var song = Song.Create(artist, genre, title, price, path);

            song = songRepository.Add(song);
            persistanceContext.SaveChanges();

            return(song);
        }