コード例 #1
0
 private static IEnumerable <Card> AllCards()
 {
     using (var context = new IccContext())
     {
         return(context.Cards.ToList());
     }
 }
コード例 #2
0
        protected override async void OnLaunched(LaunchActivatedEventArgs args)
        {
            if (!args.PrelaunchActivated)
            {
                await ActivationService.ActivateAsync(args);
            }

            SQLitePCL.Batteries_V2.Init();
            SQLitePCL.raw.sqlite3_win32_set_directory(/*data directory type*/ 1, Windows.Storage.ApplicationData.Current.LocalFolder.Path);
            SQLitePCL.raw.sqlite3_win32_set_directory(/*temp directory type*/ 2, Windows.Storage.ApplicationData.Current.TemporaryFolder.Path);

            using (var context = new IccContext())
            {
                context.Database.Migrate();
            }

            ReaderService.DeviceSetAsync();
        }