Example #1
0
 public void InsertOrReplaceWithChildren(T entity)
 {
     //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.InsertOrReplaceWithChildren(entity, true);
             }
             catch (Exception ex)
             {
                 Debug.WriteLine($"SQLiteError: {ex.Message}");
             }
         }
 }