public async Task AddItemAsync(Student item) { using (var conn = new SqLiteBase(dbPath)) { await conn.db.InsertAsync(item).ConfigureAwait(false); } }
public StudentSqLiteDataStore() { using (var conn = new SqLiteBase()) { // create table if not exist conn.db.CreateTableAsync <Student>(); } }
public StudentSqLiteDataStore(string dbPath) { this.dbPath = dbPath; using (var conn = new SqLiteBase(dbPath)) { // create table if not exist conn.db.CreateTableAsync <Student>(); } }