Пример #1
0
 public void Update(DownloadDBModel dbm)
 {
     lock (db_lock)
     {
         var db = new SQLiteConnection(db_path);
         db.Update(dbm);
         db.Close();
     }
 }
Пример #2
0
 public void Add(DownloadDBModel dbm)
 {
     lock (db_lock)
     {
         var db    = new SQLiteConnection(db_path);
         var count = db.ExecuteScalar <int>("select count(*) from DownloadDBModel");
         dbm.Id = count;
         db.Insert(dbm);
         db.Close();
     }
 }