ViewDataDictionary<TModel> Class¶
- Namespace
Microsoft.AspNetCore.Mvc.ViewFeatures
- Assemblies
- Microsoft.AspNetCore.Mvc.ViewFeatures
Syntax¶
public class ViewDataDictionary<TModel> : ViewDataDictionary, IDictionary<string, object>, ICollection<KeyValuePair<string, object>>, IEnumerable<KeyValuePair<string, object>>, IEnumerable
-
class
Microsoft.AspNetCore.Mvc.ViewFeatures.
ViewDataDictionary<TModel>
¶
Constructors¶
-
ViewDataDictionary
(Microsoft.AspNetCore.Mvc.ModelBinding.IModelMetadataProvider, Microsoft.AspNetCore.Mvc.ModelBinding.ModelStateDictionary)¶ Initializes a new instance of the
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1
class.public ViewDataDictionary(IModelMetadataProvider metadataProvider, ModelStateDictionary modelState)
-
ViewDataDictionary
(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary) Initializes a new instance of the
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1
class based in part on an existingMicrosoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
instance.public ViewDataDictionary(ViewDataDictionary source)
-
ViewDataDictionary
(Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary, System.Object) Initializes a new instance of the
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary`1
class based in part on an existingMicrosoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary
instance. This constructor is careful to avoid exceptionsMicrosoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary.SetModel(System.Object)
may throw when <em>model</em> is <code>null</code>.public ViewDataDictionary(ViewDataDictionary source, object model)
-
Properties¶
-
Microsoft.AspNetCore.Mvc.ViewFeatures.ViewDataDictionary<TModel>.
Model
¶ Return type: TModel public TModel Model { get; set; }
-