示例#1
0
        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);
        }
示例#2
0
 public PlaylistPage(Playlist playlist)
 {
     BindingContext = new PlaylistPageModel(playlist);
     InitializeComponent();
 }