public static IEnumerable <TSource> ByPredicate <TSource>(this IReadOnlyQueryableSetBase <TSource> set, Func <TSource, bool> predicate)
 {
     return(AsyncHelper.RunSync(async() => await set.ByPredicateAsync(predicate)));
 }
        public static async Task <IEnumerable <IGroup> > ByDisplayNamesAsync(this IReadOnlyQueryableSetBase <IGroup> groups, params string[] displayNames)
        {
            var result = await groups.ByPredicateAsync((g) => displayNames.Contains(g.DisplayName)).ConfigureAwait(false);

            return(result);
        }