ModelMetadata.FromLambdaExpression<TParameter,TValue> Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
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
The metadata.
Applies to
Feedback
https://aka.ms/ContentUserFeedback.
Coming soon: Throughout 2024 we will be phasing out GitHub Issues as the feedback mechanism for content and replacing it with a new feedback system. For more information see:Submit and view feedback for