Share via


ModelExplorer.Container Property

Definition

Gets the container ModelExplorer.

public:
 property Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ Container { Microsoft::AspNetCore::Mvc::ViewFeatures::ModelExplorer ^ get(); };
public Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer Container { get; }
member this.Container : Microsoft.AspNetCore.Mvc.ViewFeatures.ModelExplorer
Public ReadOnly Property Container As ModelExplorer

Property Value

Remarks

The Container will most commonly be set as a result of calling GetExplorerForProperty(String). In this case, the returned ModelExplorer will have it's Container set to the instance upon which GetExplorerForProperty(String) was called.

This however is not a requirement. The Container is informational, and may not represent a type that defines the property represented by Metadata. This can occur when constructing a ModelExplorer based on evaluation of a complex expression.

If calling code relies on a parent-child relationship between ModelExplorer instances, then use ContainerType to validate this assumption.

Applies to