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

 

Returns the metadata from the Expression parameter for the model.

Namespace:   System.Web.Mvc
Assembly:  System.Web.Mvc (in System.Web.Mvc.dll)

public static ModelMetadata FromLambdaExpression<TParameter, TValue>(
	Expression<Func<TParameter, TValue>> expression,
	ViewDataDictionary<TParameter> viewData
)

Parameters

expression
Type: System.Linq.Expressions.Expression<Func<TParameterTValue>>

An expression that identifies the model.

viewData
Type: System.Web.Mvc.ViewDataDictionary<TParameter>

The view data dictionary.

Return Value

Type: System.Web.Mvc.ModelMetadata

The metadata.

Type Parameters

TParameter

The type of the parameter.

TValue

The type of the value.

This method is called by templated helpers to get model metadata. For more information, see .

Return to top
Show: