public List <Tag> GetCrmTags(string email) { var tags = new List <Tag>(); using (var daoFactory = new DaoFactory()) { var daoCrmContacts = daoFactory.CreateCrmContactDao(Tenant, User); var allowedContactIds = daoCrmContacts.GetCrmContactIds(email); if (!allowedContactIds.Any()) { return(tags); } var daoTag = daoFactory.CreateTagDao(Tenant, User); tags = daoTag.GetCrmTags(allowedContactIds); return(tags .Where(p => !string.IsNullOrEmpty(p.TagName)) .OrderByDescending(p => p.Id) .ToList()); } }