ModelExplorer.GetExplorerForProperty Method

Definition

Overloads

GetExplorerForProperty(String)

Gets a ModelExplorer for the property with given name, or null if the property cannot be found.

GetExplorerForProperty(String, Func<Object,Object>)

Gets a ModelExplorer for the property with given name, or null if the property cannot be found.

GetExplorerForProperty(String, Object)

Gets a ModelExplorer for the property with given name, or null if the property cannot be found.

GetExplorerForProperty(String)

Source:
ModelExplorer.cs
Source:
ModelExplorer.cs
Source:
ModelExplorer.cs

Gets a ModelExplorer for the property with given name, or null if the property cannot be found.

C#
public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForProperty (string name);

Parameters

name
String

The property name.

Returns

A ModelExplorer, or null.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

GetExplorerForProperty(String, Func<Object,Object>)

Source:
ModelExplorer.cs
Source:
ModelExplorer.cs
Source:
ModelExplorer.cs

Gets a ModelExplorer for the property with given name, or null if the property cannot be found.

C#
public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForProperty (string name, Func<object,object> modelAccessor);

Parameters

name
String

The property name.

modelAccessor
Func<Object,Object>

An accessor for the model value.

Returns

A ModelExplorer, or null.

Remarks

As this creates a model explorer with a specific model accessor function, the result is not cached.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0

GetExplorerForProperty(String, Object)

Source:
ModelExplorer.cs
Source:
ModelExplorer.cs
Source:
ModelExplorer.cs

Gets a ModelExplorer for the property with given name, or null if the property cannot be found.

C#
public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer GetExplorerForProperty (string name, object model);

Parameters

name
String

The property name.

model
Object

The model value.

Returns

A ModelExplorer, or null.

Remarks

As this creates a model explorer with a specific model value, the result is not cached.

Applies to

ASP.NET Core 9.0 and other versions
Product Versions
ASP.NET Core 1.0, 1.1, 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0