public IEnumerable<string> GetPersonLinkIds(string personId, PersonLinkType[] linkTypes = null) { var query = repoPersonLink.Query(o => o.PersonId == personId); if (linkTypes != null && linkTypes.Length > 0) { query = query.Where(o => linkTypes.Contains(o.LinkType)); } var ids = query.Select(o => o.LinkPersonId).ToArray(); return ids; }
public IEnumerable<PersonLink> GetPersonLinks(string personId, PersonLinkType[] linkTypes = null) { var query = repoPersonLink.Query(o => o.PersonId == personId); if (linkTypes != null && linkTypes.Length > 0) { query = query.Where(o => linkTypes.Contains(o.LinkType)); } return query.ToArray(); }