Skip to content

Instantly share code, notes, and snippets.

@ebalders
Created August 27, 2015 15:14
Show Gist options
  • Save ebalders/8fd8c8a03e4dbd5a07dc to your computer and use it in GitHub Desktop.
Save ebalders/8fd8c8a03e4dbd5a07dc to your computer and use it in GitHub Desktop.
public IList<IndustryCode> GetAll(bool excludeCats = true)
{
var qo = M3QueryOver.Of<IndustryCode>();
qo.Where(c => c.DD == null);
if (excludeCats)
{
qo.Where(c => c.ParentIndustryCode != null);
}
qo.OrderBy(c => c.Code);
return qo.GetExecutableQueryOver(Session).List<IndustryCode>();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment