ModelMetadata.FromLambdaExpression(TParameter, TValue) Method
Returns the metadata from the Expression parameter for the model.
Namespace: System.Web.Mvc
Assembly: System.Web.Mvc (in System.Web.Mvc.dll)
static member FromLambdaExpression : expression:Expression<Func<'TParameter, 'TValue>> * viewData:ViewDataDictionary<'TParameter> -> ModelMetadata
Type Parameters
- TParameter
The type of the parameter.
- TValue
The type of the value.
Parameters
- expression
- Type: System.Linq.Expressions.Expression(Func(TParameter, TValue))
An expression that identifies the model.
- viewData
- Type: System.Web.Mvc.ViewDataDictionary(TParameter)
The view data dictionary.
This method is called by templated helpers to get model metadata. For more information, see Walkthrough: Using Templated Helpers to Display Data.
Show: