Db, Entity, Repository, RepositoryManager logic