private bool InsertMusicPlaylist(Music music, List playlist) { try { DAO_List listDao = Dao as DAO_List; listDao.AddMusic(music, playlist); return(true); } catch (InvalidCastException e) { Console.WriteLine("IOException source: {0}", e.Source); return(false); } }
public bool RemoveMusic(Music music) { try { List list = Model as List; DAO_List dao = Dao as DAO_List; List listcomplete = dao.FetchOne(list.Id); dao.RemoveMusic(music, listcomplete); return(true); } catch (InvalidCastException e) { Console.WriteLine("IOException source: {0}", e.Source); return(false); } }
private bool InsertMusicAlbum(Music music, List album) { try { if (music.User.Id == album.User.Id) { DAO_List listDao = Dao as DAO_List; listDao.AddMusic(music, album); return(true); } return(false); } catch (InvalidCastException e) { Console.WriteLine("IOException source: {0}", e.Source); return(false); } }
public IList <List> GetByUser(User user) { DAO_List dao = new DAO_List(); return(dao.GetByUserId(user.Id)); }
public List FetchOne(int id) { DAO_List dao = new DAO_List(); return(dao.FetchOne(id)); }
public Mapper_List() { Dao = new DAO_List(); Model = new List(); }