Révision 22c79571 GES_PAC/App.xaml.cs

Voir les différences:

GES_PAC/App.xaml.cs
1 1
using GES_PAC.Model;
2
using GES_PAC.Services;
2 3
using GES_PAC.ViewModel;
3 4
using Microsoft.EntityFrameworkCore;
4 5

  
......
6 7
{
7 8
    public partial class App : Application
8 9
    {
9
        public static AppDbContext Db { get; private set; }
10
        public static AppDbContext? Db { get; private set; }
11
        public static SicpaService? Sicpa { get; private set; }
10 12
        public App()
11 13
        {
14
            //to delete database
15
            //string dbPath = Path.Combine(FileSystem.AppDataDirectory, "GES_PAC.db3");
16

  
17
            //if (File.Exists(dbPath))
18
            //{
19
            //    File.Delete(dbPath);
20
            //}
21

  
12 22
            InitializeComponent();
13 23
            Db = new AppDbContext();
14 24
            Db.Database.EnsureCreated();
15

  
16 25
            _ = InitSmartEnumsAsync();
26

  
27
            Sicpa = new SicpaService();
28
            Sicpa.CreateToken();
17 29
        }
18 30

  
19 31
        protected override Window CreateWindow(IActivationState? activationState)

Formats disponibles : Unified diff