public void Can_Perform_Count_On_UserGroupRepository() { // Arrange IScopeProvider provider = ScopeProvider; using (IScope scope = provider.CreateScope()) { UserGroupRepository repository = CreateRepository(provider); IUserGroup[] userGroups = CreateAndCommitMultipleUserGroups(repository); // Act IQuery <IUserGroup> query = provider.CreateQuery <IUserGroup>().Where(x => x.Alias == "testGroup1" || x.Alias == "testGroup2"); int result = repository.Count(query); // Assert Assert.That(result, Is.GreaterThanOrEqualTo(2)); } }