public PlaylistPageModel GetPlaylistMetaData() { var pageModel = new PlaylistPageModel(); try { using (var context = new sparrow_dbEntities()) { var playlistId = context.sprw_playlist.Max(i => i.PLAYLIST_ID); var pages = context.SPRW_PLAYLIST_PAGES.Where(i => i.PLAYLIST_ID == playlistId).Max(i => i.PAGE_NUM); pageModel.PlaylistID = playlistId; pageModel.TotalPages = pages; } } catch (Exception e) { } return(pageModel); }
public PlaylistPage(Playlist playlist) { BindingContext = new PlaylistPageModel(playlist); InitializeComponent(); }