ModelMetadata.FromLambdaExpression(Expression<Func<TParameter,TValue>>, ViewDataDictionary<TParameter>) ModelMetadata.FromLambdaExpression(Expression<Func<TParameter,TValue>>, ViewDataDictionary<TParameter>) ModelMetadata.FromLambdaExpression(Expression<Func<TParameter,TValue>>, ViewDataDictionary<TParameter>) Method

Definition

Returns the metadata from the Expression parameter for the model.

public static System.Web.Mvc.ModelMetadata FromLambdaExpression<TParameter,TValue> (System.Linq.Expressions.Expression<Func<TParameter,TValue>> expression, System.Web.Mvc.ViewDataDictionary<TParameter> viewData);
static member FromLambdaExpression : System.Linq.Expressions.Expression<Func<'Parameter, 'Value>> * System.Web.Mvc.ViewDataDictionary<'Parameter> -> System.Web.Mvc.ModelMetadata
Public Shared Function FromLambdaExpression(Of TParameter, TValue) (expression As Expression(Of Func(Of TParameter, TValue)), viewData As ViewDataDictionary(Of TParameter)) As ModelMetadata

Type Parameters

TParameter

The type of the parameter.

TValue

The type of the value.

Parameters

expression
Expression<Func<TParameter,TValue>>

An expression that identifies the model.

viewData
ViewDataDictionary<TParameter>

The view data dictionary.

Returns

Applies to