public object GetConnection() { string path = _databasePathProvider.GetDatabasePath(); SQLiteConnection connection = (!_databasePathProvider.DatabaseFileExists(path)) ? CreateDataBase(path) : new SQLiteConnection(path); return(connection); }
public Task InitializeDatabaseAsync() { var path = _pathProvider.GetDatabasePath(); return(!File.Exists(path) ? _extractor.ExtractDatabaseAsync(path) : Task.CompletedTask); }
public object GetConnection() { string path = _databasePathProvider.GetDatabasePath(); if (!_databasePathProvider.DatabaseFileExists(path)) { CreateDataBase(path); } return(CreateNewConnection(path)); }
public UnitOfWork(IDatabasePathProvider provider) { var databasePath = provider.GetDatabasePath(PersistenceConstants.DatabaseFilename); conn = new SQLiteAsyncConnection(databasePath, PersistenceConstants.DatabaseFlags); }