/// <summary> /// Invoked when the application is launched normally by the end user. /// Database migration is performed if necessary. /// </summary> private void MigrateDatabase(DeskberryContext db) { var localPath = ApplicationData.Current.LocalFolder.Path + @"\deskberry.db"; var fInfo = new FileInfo(localPath); if (!fInfo.Exists) { db.Database.Migrate(); } }
/// <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() { // Syncfusion key Syncfusion.Licensing.SyncfusionLicenseProvider.RegisterLicense("MjQ3MzU2QDMxMzgyZTMxMmUzMFk3T0E4L09Pb1lyYmpqd25jM3RNNzZmSXVkTFJDeXRhSDNzVEYwQ01MZE09"); this.InitializeComponent(); this.Suspending += OnSuspending; MainContainer.RegisterService(); _Context = MainContainer.Container.GetService <DeskberryContext>(); }
public FavoriteService(DeskberryContext context) { _context = context; }
public AvatarService(DeskberryContext context) { _context = context; }
public HomePageService(DeskberryContext context) => _context = context;
public AccountService(DeskberryContext context) { _context = context; _passwordManager = new PasswordManager(); }
public NoteService(DeskberryContext context) { _context = context; }