/// <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() { DependencyContainer.InitializeContainer(this); InitializeComponent(); Suspending += OnSuspending; BatContext dbManager = DependencyContainer.Current.Resolve <BatContext>(); dbManager.Database.Migrate(); }
public MainPageModel(NavigationEventArgs navigation, BatContext db, NavigationService navigationService, BatNodeLogReader logReader) { _db = db; _navigationService = navigationService; _logReader = logReader; ImportFileCommand = new RelayCommand(async() => await ImportLogFile()); EditCommand = new RelayCommand(() => { if (SelectedItem != null) { _navigationService.EditLog(SelectedItem); } }, () => SelectedItem != null); DetailsCommand = new RelayCommand(() => { if (SelectedItem != null) { _navigationService.NavigateToLogDetails(SelectedItem); } }, () => SelectedItem != null); ManageDevicesCommand = new RelayCommand(() => _navigationService.NavigateToMangeDevices()); }
public EditLogViewModel(NavigationEventArgs navigation, BatContext db, NavigationHelper navigationHelper) : this((BatNodeLog)navigation.Parameter) { Db = db; _navigationHelper = navigationHelper; }
public LogDetailsPageModel(NavigationEventArgs navigation, BatContext db, NavigationService navigationService) : this((BatNodeLog)navigation.Parameter) { _db = db; _navigationService = navigationService; }
public PersonsRepository(BatContext context) { _context = context; }