private void UpdateRepo(Guid repoId, Action<RepositoryModel> transform)
 {
     EFRepositoryRepository repoRepo = new EFRepositoryRepository { CreateContext = GetContext };
     var repo = repoRepo.GetRepository(repoId);
     transform(repo);
     repoRepo.Update(repo);
 }
 /// <summary>
 /// A check-permission routine which runs checks by both name and Guid, and makes sure they agree
 /// </summary>
 private bool CheckPermission(Guid userId, Guid repoId)
 {
     bool byGuid = _service.HasPermission(userId, repoId);
     EFRepositoryRepository repoRepo = new EFRepositoryRepository { CreateContext = GetContext };
     bool byName = _service.HasPermission(userId, repoRepo.GetRepository(repoId).Name);
     Assert.IsTrue(byGuid == byName);
     return byGuid;
 }