public async Task<int> RemoveAccountUser(AccountUser user) { using (var db = new UserAccountDataSource(Platform, DbLocation)) { return await db.AccountUserRepository.Delete(user); } }
public async Task <List <AccountUser> > GetUserAccounts() { using (var ds = new UserAccountDataSource(Platform, DbLocation)) { return(await ds.AccountUserRepository.GetAllWithChildren()); } }
public async Task<List<AccountUser>> GetUserAccounts() { using (var ds = new UserAccountDataSource(Platform, DbLocation)) { return await ds.AccountUserRepository.GetAllWithChildren(); } }
public async Task <int> RemoveAccountUser(AccountUser user) { using (var db = new UserAccountDataSource(Platform, DbLocation)) { return(await db.AccountUserRepository.Delete(user)); } }
public async Task<int> UpdateAccountUser(AccountUser user) { using (var db = new UserAccountDataSource()) { return await db.AccountUserRepository.Update(user); } }
public async Task <int> UpdateAccountUser(AccountUser user) { using (var db = new UserAccountDataSource()) { return(await db.AccountUserRepository.Update(user)); } }
public async Task<AccountUser> GetUserAccount(string id) { using (var ds = new UserAccountDataSource(Platform, DbLocation)) { var account = await ds.AccountUserRepository.Get(id); return account; } }
public async Task<List<AccountUser>> GetDefaultUserAccounts() { using (var ds = new UserAccountDataSource(Platform, DbLocation)) { var accounts = await ds.AccountUserRepository.GetAllWithChildren(); return accounts.Where(node => node.IsDefaultLogin).ToList(); } }
public async Task<bool> HasDefaultAccounts() { using (var ds = new UserAccountDataSource(Platform, DbLocation)) { var accounts = await ds.AccountUserRepository.GetAllWithChildren(); return accounts.Any(node => node.IsDefaultLogin); } }
public async Task <AccountUser> GetUserAccount(string id) { using (var ds = new UserAccountDataSource(Platform, DbLocation)) { var account = await ds.AccountUserRepository.Get(id); return(account); } }
public async Task <List <AccountUser> > GetDefaultUserAccounts() { using (var ds = new UserAccountDataSource(Platform, DbLocation)) { var accounts = await ds.AccountUserRepository.GetAllWithChildren(); return(accounts.Where(node => node.IsDefaultLogin).ToList()); } }
public async Task <bool> HasDefaultAccounts() { using (var ds = new UserAccountDataSource(Platform, DbLocation)) { var accounts = await ds.AccountUserRepository.GetAllWithChildren(); return(accounts.Any(node => node.IsDefaultLogin)); } }
/// <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 { UserAccountDataSource ds = new UserAccountDataSource(); ds.InitDatabase(); ds.CreateDatabase(); } catch(Exception ex) { } }
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 }