FindPropertyFromExpression() public static method

public static FindPropertyFromExpression ( LambdaExpression lambdaExpression ) : PropertyInfo
lambdaExpression System.Linq.Expressions.LambdaExpression
return System.Reflection.PropertyInfo
Ejemplo n.º 1
0
        public IJqGridColumnBuilder AddColumn <T>(Expression <Func <T, object> > expression)
        {
            var property = ReflectionHelpers.FindPropertyFromExpression(expression);

            AddColumn(property.Name);
            return(this);
        }
Ejemplo n.º 2
0
        public IJqGridBuilder SortBy <T>(Expression <Func <T, object> > expression)
        {
            var property = ReflectionHelpers.FindPropertyFromExpression(expression);

            this.sortname = property.Name;
            return(this);
        }