ebalders
8/27/2015 - 3:14 PM

IndustryCodeDao.cs

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>();
        }