ModelExpression Class

Summary

Describes an [System.Linq.Expressions.Expression]() passed to a tag helper.

Syntax

public sealed class ModelExpression

GitHub

View on GitHub

class Microsoft.AspNet.Mvc.Rendering.ModelExpression

Constructors

ModelExpression(System.String, Microsoft.AspNet.Mvc.ModelBinding.ModelExplorer)

Initializes a new instance of the [Microsoft.AspNet.Mvc.Rendering.ModelExpression](Microsoft.AspNet.Mvc.Rendering.ModelExpression.yml) class.

Arguments:
  • name (System.String) – String representation of the [System.Linq.Expressions.Expression]() of interest.
  • modelExplorer (Microsoft.AspNet.Mvc.ModelBinding.ModelExplorer) – Includes the model and metadata about the [System.Linq.Expressions.Expression]() of interest.
public ModelExpression(string name, ModelExplorer modelExplorer)

Properties

Metadata()

Metadata about the [System.Linq.Expressions.Expression]() of interest.

Return type:Microsoft.AspNet.Mvc.ModelBinding.ModelMetadata
public ModelMetadata Metadata { get; }
Model()

Gets the model object for the [System.Linq.Expressions.Expression]() of interest.

Return type:System.Object
public object Model { get; }
ModelExplorer()

Gets the model explorer for the [System.Linq.Expressions.Expression]() of interest.

Return type:Microsoft.AspNet.Mvc.ModelBinding.ModelExplorer
public ModelExplorer ModelExplorer { get; }
Name()

String representation of the [System.Linq.Expressions.Expression]() of interest.

Return type:System.String
public string Name { get; }