示例#1
0
        public Query <T> Include <TProperty>(Expression <Func <T, TProperty> > property)
        {
            var expression = property.Body;

            switch (expression.NodeType)
            {
            case ExpressionType.MemberAccess:
                var members = DecodeMemberExpression(expression as MemberExpression);
                Includes.AddRange(members);
                break;

            case ExpressionType.Call:
                var calls = DecodeCallExpression(expression as MethodCallExpression);
                Includes.AddRange(calls);
                break;
            }

            return(this);
        }
示例#2
0
 public void AddIncludeRange(List <Expression <Func <TEntity, object> > > includesExpression)
 {
     Includes.AddRange(includesExpression);
 }
示例#3
0
 public void AddPatternSet(PatternSet patternSet)
 {
     Includes.AddRange(patternSet.GetIncludePatterns());
     Excludes.AddRange(patternSet.GetExcludePatterns());
 }
示例#4
0
 public Include(params string[] includes) : this()
 {
     Includes.AddRange(includes);
 }