Exemplo n.º 1
0
        protected override IExpressionTree CorrectFields(object entity, IExpressionTree fields)
        {
            if (fields == null || fields.Children.Count == 0)
            {
                return(DefaultFields.GetOrAdd(entity.GetType(), t => new ExpressionParser().ParseTree(t, "id,name,url")));
            }

            return(base.CorrectFields(entity, fields));
        }
 protected override IExpressionTree CorrectFields(object entity, IExpressionTree fields)
 => DefaultFields.GetOrAdd(entity.GetType(), t => _fieldsParser.ParseDefaultFields(t));