CreateDatabase() 공개 메소드

public CreateDatabase ( ) : void
리턴 void
예제 #1
0
        public App()
        {
            Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync();
            InitializeComponent();

            #region App settings

            Settings = SettingsService.Instance;
            //RequestedTheme = _settings.AppTheme;

            #endregion

            #region Database
            var db = new UserAccountDataSource(new SQLitePlatformWinRT(), DatabaseWinRTHelpers.GetWinRTDatabasePath(StringConstants.UserDatabase));
            db.CreateDatabase();

            var dbs = new StickersDataSource(new SQLitePlatformWinRT(), DatabaseWinRTHelpers.GetWinRTDatabasePath(StringConstants.StampDatabase));
            dbs.CreateDatabase();
            #endregion  
        }
예제 #2
0
        /// <summary>
        /// Initializes the singleton application object.  This is the first line of authored code
        /// executed, and as such is the logical equivalent of main() or WinMain().
        /// </summary>
        public App()
        {
            Microsoft.ApplicationInsights.WindowsAppInitializer.InitializeAsync(
                Microsoft.ApplicationInsights.WindowsCollectors.Metadata |
                Microsoft.ApplicationInsights.WindowsCollectors.Session);
            this.InitializeComponent();
            this.Suspending += OnSuspending;
            Container = AutoFacConfiguration.Configure();

            try
            {
                StickersDataSource bs = new StickersDataSource();
                UserAccountDataSource ds = new UserAccountDataSource();
                ds.InitDatabase();
                ds.CreateDatabase();
                bs.InitDatabase();
                bs.CreateDatabase();
            }
            catch(Exception ex)
            {
            }
           
        }