public async Task Put <T>(T entity) where T : IEntity { await Task.Run(() => { using var db = new LiteDB.LiteRepository(_connectionString); db.Update(entity); }); }
/// <summary> /// Updates customer information to database. /// </summary> /// <param name="customer"></param> /// <returns></returns> public bool Update(Customer customer) { using (var repo = new LiteDB.LiteRepository(ConnectionString)) { try { return(repo.Update(customer)); } catch (DbException e) { throw e; } } }