public List <SongDTO> getAllSongsByAlbum(string album) { SongDAO sDAO = new SongDAO(); AlbumDAO aDAO = new AlbumDAO(); return(sDAO.getAllFromDbByAlbumId(aDAO.getIdFromDb(album))); }
public void SetUp() { session = HibernateSession.SessionFactory().OpenSession(); voteDao = new VoteDAO(session); songDao = new SongDAO(session); bandDao = new BandDAO(session); }
public void delete(string name) { FunctionController fc = new FunctionController(); SongDAO sDAO = new SongDAO(); sDAO.deleteSong(name); }
public void create() { SongDTO sDTO = new SongDTO(name, trackNo, duration, songtext, album); SongDAO sDAO = new SongDAO(); sDAO.insertSong(sDTO); }
public Grammar searchLyricsGrammar() { SongDAO dao = new SongDAO(); List <String> lyricsList = dao.getaAllLyrics(); string[] lines = { }; for (int i = 0; i < lyricsList.Count; i++) { lines = Regex.Split(lyricsList[i], " "); } GrammarBuilder grammarBuilder = new GrammarBuilder(); grammarBuilder.Culture = new System.Globalization.CultureInfo("en-US"); Choices commands = new Choices(); commands.Add(lines); grammarBuilder.Append(commands); Grammar grammar = new Grammar(grammarBuilder); return(grammar); }
public List<Song> Search(String keyword) { List<Song> songs = new SongDAO().SelectByKeyword(keyword); return songs; }
public Song GetDetails(int id) { Song song = new SongDAO().SelectById(id); return song; }
public List<Song> GetAll() { List<Song> songs = new SongDAO().SelectAll(); return songs; }
/*public Task<int> SaveItemAsync(Album item) * { * return database.InsertAsync(item); * }*/ public Task <int> SaveItemAsync(SongDAO item) { return(database.InsertAsync(item)); }