Dela via


ModelExpressionProvider.CreateModelExpression Method

Definition

Overloads

CreateModelExpression<TModel,TValue>(ViewDataDictionary<TModel>, Expression<Func<TModel,TValue>>)

Returns a ModelExpression instance describing the given expression.

CreateModelExpression<TModel>(ViewDataDictionary<TModel>, String)

Returns a ModelExpression instance describing the given expression.

CreateModelExpression<TModel,TValue>(ViewDataDictionary<TModel>, Expression<Func<TModel,TValue>>)

Source:
ModelExpressionProvider.cs
Source:
ModelExpressionProvider.cs
Source:
ModelExpressionProvider.cs

Returns a ModelExpression instance describing the given expression.

public:
generic <typename TModel, typename TValue>
 virtual 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
override this.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.

Implements

Applies to

CreateModelExpression<TModel>(ViewDataDictionary<TModel>, String)

Source:
ModelExpressionProvider.cs

Returns a ModelExpression instance describing the given expression.

public:
generic <typename TModel>
 Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExpression ^ CreateModelExpression(Microsoft::AspNetCore::Mvc::ViewFeatures::ViewDataDictionary<TModel> ^ viewData, System::String ^ expression);
public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression CreateModelExpression<TModel> (Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary<TModel> viewData, string expression);
member this.CreateModelExpression : Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary<'Model> * string -> Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExpression
Public Function CreateModelExpression(Of TModel) (viewData As ViewDataDictionary(Of TModel), expression As String) As ModelExpression

Type Parameters

TModel

The type of the viewData's Model.

Parameters

viewData
ViewDataDictionary<TModel>

The ViewDataDictionary<TModel> containing the Model against which expression is evaluated.

expression
String

Expression name, relative to viewData.Model.

Returns

A new ModelExpression instance describing the given expression.

Applies to