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
.
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