update repository - connedted to database