public async Task Post <T>(T entity) { await Task.Run(() => { using var db = new LiteDB.LiteRepository(_connectionString); db.Insert(entity); }); }
public void Create(Customer customer) { using (var repo = new LiteDB.LiteRepository(ConnectionString)) { try { repo.Insert(customer); } catch (DbException e) { throw e; } } }