System.DirectoryServices.Linq.2.0.Beta.1

Rating: No reviews yet
Downloads: 7
Updated: Jun 20, 2013 by sbaker
Dev status: Planning Help Icon

Recommended Download

Application System.DirectoryServices.Linq.2.0.Beta.1
application, 206K, uploaded Jun 13, 2013 - 7 downloads

Release Notes

In this release I added the ability to query containers (organizational units).

using (var context = new DirectoryContextMock())
{
	var ou = context.OrganizationalUnits.Single(u => u.Name == "TestOU");
	var result = ou.Ous.Last(u => u.Name != null);
	Assert.AreEqual(result.Name, "Test2");
}

using (var context = new DirectoryContextMock())
{
	var ou = context.OrganizationalUnits.Single(u => u.Name == "TestOU");
	var result = ou.Users.First(u => u.FirstName != null);
	Assert.AreEqual(result.FirstName, "Test1");
}

ou.Ous is not queried until enumerated.