Example #1
0
 public void InsertAllWithChildren(System.Collections.IEnumerable collection)
 {
     //using (SQLiteConnection _dbManager = new SQLiteConnection(_baseUrl.GetDatabasePath(), WriteOnlyFlags))
     using (SQLiteConnectionWithLock _dbManager = new SQLiteConnectionWithLock(new SQLiteConnectionString(_baseUrl.GetDatabasePath(), false, null), SQLiteOpenFlags.ReadWrite | SQLiteOpenFlags.Create | SQLiteOpenFlags.FullMutex | SQLiteOpenFlags.SharedCache))
     {
         using (_dbManager.Lock())
         {
             try
             {
                 _dbManager.InsertAllWithChildren(collection, true);
             }
             catch (Exception ex)
             {
                 Debug.WriteLine($"SQLiteError: {ex.Message}");
             }
         }
     }
 }