add entities from database and repository