public SQLiteRepository(ISQLite SQLite) { if (SQLite == null) { throw new ArgumentNullException("SQLite"); } _SQLiteConnection = SQLite.GetAsyncConnection(); _SQLiteConnection.CreateTableAsync <T>().Wait(); }
public BaseRepository(ISQLite sqlite, IEventAggregator eventAggregator) { _connection = sqlite.GetConnection(); _asyncConnection = sqlite.GetAsyncConnection(); _eventAggregator = eventAggregator; CreateTableIfNonExistent(); _eventAggregator.GetEvent <LogoutEvent>().Subscribe(async() => await RemoveAllAsync()); }
public DatabaseService(ISQLite sqlite) { _sqlite = sqlite; var connection = _sqlite.GetConnection(); UpdateDatabase(connection); _connection = _sqlite.GetAsyncConnection(); }
public async Task OpenAsyncConnection() { _asyncConnection = _sqlite.GetAsyncConnection(); try { await _asyncConnection.Table <T>().CountAsync(); } catch (SQLiteException) { await _asyncConnection.CreateTableAsync <T>(); } }
public SQLiteAsyncConnection GetAsyncConnection() { return(_sqlite.GetAsyncConnection()); }
public SQLiteNhanVienStore(ISQLite db) { _connection = db.GetAsyncConnection(); _connection.CreateTableAsync <NhanVien>(); }
public Repository(ISQLite connectionService) { _connectionService = connectionService; _db = _connectionService.GetAsyncConnection(); _db.CreateTableAsync <T>(); }
public SQLiteHoaDonStore(ISQLite db) { _connection = db.GetAsyncConnection(); _connection.CreateTableAsync <HoaDon>(); }
public SQLiteFoodStore(ISQLite db) { _connection = db.GetAsyncConnection(); _connection.CreateTableAsync <Food>(); }