IModelExpressionProvider.CreateModelExpression<TModel,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 a ModelExpression instance describing the given expression
.
public:
generic <typename TModel, typename TValue>
Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExpression ^ CreateModelExpression(Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary<TModel> ^ viewData, System::Linq::Expressions::Expression<Func<TModel, TValue> ^> ^ expression);
public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression CreateModelExpression<TModel,TValue> (Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary<TModel> viewData, System.Linq.Expressions.Expression<Func<TModel,TValue>> expression);
abstract member CreateModelExpression : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary<'Model> * System.Linq.Expressions.Expression<Func<'Model, 'Value>> -> Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression
Public Function CreateModelExpression(Of TModel, TValue) (viewData As ViewDataDictionary(Of TModel), expression As Expression(Of Func(Of TModel, TValue))) As ModelExpression
Type Parameters
- TModel
The type of the viewData
's Model.
- TValue
The type of the expression
result.
Parameters
- viewData
- ViewDataDictionary<TModel>
The ViewDataDictionary<TModel> containing the Model
against which expression
is evaluated.
- expression
- Expression<Func<TModel,TValue>>
An expression to be evaluated against the current model.
Returns
A new ModelExpression instance describing the given expression
.