public void FindRoots_Parameter() { var company = RepositoryTool.FindOneByCode <Company>(CompanyCode); var depts = RepositoryTool.FindRoots <Department>(0, 0, null, new NHParameter("Company", company)); depts.Count.Should().Be(1); }
public void FindRoots_Expression() { var company = RepositoryTool.FindOneByCode <Company>(CompanyCode); var depts = RepositoryTool.FindRoots <Department>(d => d.Company == company); depts.Count.Should().Be(1); depts = RepositoryTool.FindRoots <Department>(0, 0, d => d.Company == company); depts.Count.Should().Be(1); }