Пример #1
0
 public async Task AddItemAsync(Student item)
 {
     using (var conn = new SqLiteBase(dbPath))
     {
         await conn.db.InsertAsync(item).ConfigureAwait(false);
     }
 }
Пример #2
0
 public StudentSqLiteDataStore()
 {
     using (var conn = new SqLiteBase())
     {
         // create table if not exist
         conn.db.CreateTableAsync <Student>();
     }
 }
Пример #3
0
        public StudentSqLiteDataStore(string dbPath)
        {
            this.dbPath = dbPath;

            using (var conn = new SqLiteBase(dbPath))
            {
                // create table if not exist
                conn.db.CreateTableAsync <Student>();
            }
        }