示例#1
0
 public static IEnumerable <Expression <Func <TSource, object> > > GetExpansionSelectors <TSource>(this SelectExpandDefinition selectExpandDefinition) where TSource : class
 => selectExpandDefinition.GetExpansions
 (
     typeof(TSource)
 )
 .Select(list => new List <Expansion>(list))
 .BuildIncludes <TSource>
 (
     selectExpandDefinition?.Selects ?? new List <string>()
 );
        public static IEnumerable <Expression <Func <TSource, object> > > GetExpansionSelectors <TSource>(this SelectExpandDefinition selectExpandDefinition) where TSource : class
        {
            if (selectExpandDefinition == null)
            {
                return(new List <Expression <Func <TSource, object> > >());
            }

            return(selectExpandDefinition.GetExpansions(typeof(TSource))
                   .Select(list => new List <Expansion>(list))
                   .BuildIncludes <TSource>
                   (
                       selectExpandDefinition.Selects
                   ));
        }