RazorPage<TModel> Class

Summary

Represents the properties and methods that are needed in order to render a view that uses Razor syntax.

Inheritance Hierarchy

Syntax

public abstract class RazorPage<TModel> : RazorPage, IRazorPage

GitHub

View on GitHub

Microsoft.AspNet.Mvc.Razor.RazorPage<TModel>

Properties

Model()
Return type:TModel
public TModel Model { get; }
ViewData()
Return type:Microsoft.AspNet.Mvc.ViewDataDictionary{{TModel}}
public ViewDataDictionary<TModel> ViewData { get; set; }

Methods

Microsoft.AspNet.Mvc.Razor.RazorPage<TModel>.CreateModelExpression<TValue>(System.Linq.Expressions.Expression<System.Func<TModel, TValue>>)

Returns a [Microsoft.AspNet.Mvc.Rendering.ModelExpression]() instance describing the given <paramref name=”expression” />.

Arguments:
  • expression (System.Linq.Expressions.Expression{System.Func{{TModel},{TValue}}}) – An expression to be evaluated against the current model.
Return type:

Microsoft.AspNet.Mvc.Rendering.ModelExpression

Returns:

A new [Microsoft.AspNet.Mvc.Rendering.ModelExpression]() instance describing the given <paramref name=”expression” />.

public ModelExpression CreateModelExpression<TValue>(Expression<Func<TModel, TValue>> expression)