8 writes to Model
Microsoft.AspNetCore.Mvc.RazorPages (5)
Infrastructure\PageActionInvoker.cs (2)
144_pageContext.ViewData.Model = _pageModel; 168_pageContext.ViewData.Model = _page;
Infrastructure\PageResultExecutor.cs (1)
58pageContext.ViewData.Model = result.Model;
PageBase.cs (1)
1187Model = model,
PageModel.cs (1)
1545Model = model,
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
Controller.cs (2)
144ViewData.Model = model; 197ViewData.Model = model;
ViewDataDictionaryOfT.cs (1)
92set => base.Model = value;
120 references to Model
Microsoft.AspNetCore.Mvc.RazorPages (1)
PageResult.cs (1)
23public object Model => ViewData?.Model!;
Microsoft.AspNetCore.Mvc.TagHelpers (1)
PartialTagHelper.cs (1)
177return ViewContext.ViewData.Model;
Microsoft.AspNetCore.Mvc.ViewFeatures (118)
Controller.cs (2)
119return View(viewName, model: ViewData.Model); 172return PartialView(viewName, model: ViewData.Model);
DefaultDisplayTemplates.cs (9)
21if (htmlHelper.ViewData.Model != null) 23value = Convert.ToBoolean(htmlHelper.ViewData.Model, CultureInfo.InvariantCulture); 74var model = htmlHelper.ViewData.Model; 150if (htmlHelper.ViewData.TemplateInfo.FormattedModelValue == htmlHelper.ViewData.Model) 153string.Format(CultureInfo.CurrentCulture, "{0:0.00}", htmlHelper.ViewData.Model); 161var uriString = "mailto:" + ((htmlHelper.ViewData.Model == null) ? 163htmlHelper.ViewData.Model.ToString()); 279var uriString = (htmlHelper.ViewData.Model == null) ? string.Empty : htmlHelper.ViewData.Model.ToString();
DefaultEditorTemplates.cs (7)
27if (htmlHelper.ViewData.Model != null) 29value = Convert.ToBoolean(htmlHelper.ViewData.Model, CultureInfo.InvariantCulture); 57var model = viewData.Model; 133if (htmlHelper.ViewData.TemplateInfo.FormattedModelValue == htmlHelper.ViewData.Model) 136string.Format(CultureInfo.CurrentCulture, "{0:0.00}", htmlHelper.ViewData.Model); 145var model = viewData.Model; 423var value = htmlHelper.ViewData.Model;
DefaultHtmlGenerator.cs (1)
1497if (value == null || value == viewContext.ViewData.Model)
ExpressionMetadataProvider.cs (3)
157viewDataInfo.Value == viewData.Model && 204var model = viewData.Model == null ? null : Convert.ToString(viewData.Model, CultureInfo.CurrentCulture);
HtmlHelperOfT.cs (1)
73ViewData = new ViewDataDictionary<TModel>(viewContext.ViewData, viewContext.ViewData.Model);
PartialViewResult.cs (1)
35public object? Model => ViewData?.Model;
Rendering\HtmlHelperInputExtensions.cs (24)
20/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 45/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 74/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 105/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 131/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 155/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 181/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 278/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 310/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 350/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 386/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 418/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 442/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 470/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 503/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>, or 536/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 563/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 595/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>, or 630/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 655/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 687/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 715/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 747/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 774/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>.
Rendering\HtmlHelperNameExtensions.cs (1)
14/// current <see cref="ViewFeatures.ViewDataDictionary.Model"/> and the top-level view's model.
Rendering\HtmlHelperPartialExtensions.cs (8)
32return htmlHelper.PartialAsync(partialViewName, htmlHelper.ViewData.Model, viewData: null); 55return htmlHelper.PartialAsync(partialViewName, htmlHelper.ViewData.Model, viewData); 97return Partial(htmlHelper, partialViewName, htmlHelper.ViewData.Model, viewData: null); 120return Partial(htmlHelper, partialViewName, htmlHelper.ViewData.Model, viewData); 184RenderPartial(htmlHelper, partialViewName, htmlHelper.ViewData.Model, viewData: null); 203RenderPartial(htmlHelper, partialViewName, htmlHelper.ViewData.Model, viewData); 265return htmlHelper.RenderPartialAsync(partialViewName, htmlHelper.ViewData.Model, viewData: null); 288return htmlHelper.RenderPartialAsync(partialViewName, htmlHelper.ViewData.Model, viewData);
Rendering\HtmlHelperSelectExtensions.cs (11)
20/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 51/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 93/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 127/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 166/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 202/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 237/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 281/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 320/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 352/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 384/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>.
Rendering\HtmlHelperValueExtensions.cs (4)
18/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 38/// the <paramref name="expression"/> evaluated against <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 64/// the <see cref="ViewFeatures.ViewDataDictionary.Model"/>. 84/// the <see cref="ViewFeatures.ViewDataDictionary.Model"/>.
Rendering\IHtmlHelper.cs (9)
174/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 258/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 405/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>, or 449/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 473/// <see cref="ViewDataDictionary.Model"/> and the top-level view's model. 523/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 616/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 641/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>, or 720/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>.
Rendering\IHtmlHelperOfT.cs (9)
30/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 119/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 192/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 241/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 269/// <see cref="ViewDataDictionary.Model"/> and the top-level view's model. 309/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 341/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>. 368/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>, or 426/// the <paramref name="expression"/> evaluated against <see cref="ViewDataDictionary.Model"/>.
ViewComponent.cs (1)
193return View(viewName, ViewData.Model);
ViewComponentResult.cs (1)
41public object? Model => ViewData?.Model;
ViewDataDictionary.cs (21)
50/// For use when copying a <see cref="ViewDataDictionary"/> instance and the declared <see cref="Model"/> 55/// This constructor should not be used in any context where <see cref="Model"/> may be set to a value 60: this(source, source.Model, source._declaredModelType) 85/// <see cref="Type"/> of <see cref="Model"/> values expected. Used to set <see cref="ModelMetadata"/>. 106/// <see cref="Type"/> of <see cref="Model"/> values expected. Used to set <see cref="ModelMetadata"/>. 136/// <see cref="Type"/> of <see cref="Model"/> values expected. Used to set <see cref="ModelMetadata"/>. 141/// <see cref="Model"/> <see cref="Type"/> is known but <see cref="Model"/> should be copied from the existing 152: this(source, model: source.Model, declaredModelType: declaredModelType) 162/// <param name="model">Value for the <see cref="Model"/> property.</param> 164/// <see cref="Type"/> of <see cref="Model"/> values expected. Used to set <see cref="ModelMetadata"/>. 169/// <see cref="Model"/> <see cref="Type"/> and <see cref="Model"/> are known. 278/// Gets the <see cref="ModelBinding.ModelMetadata"/> for an expression, the <see cref="Model"/> (if 294/// Gets or sets the <see cref="ViewFeatures.ModelExplorer"/> for the <see cref="Model"/>. 357/// <see cref="Model"/>. 379/// <see cref="Model"/>. 426/// <see cref="Model"/>. 434/// Set <see cref="ModelExplorer"/> to ensure <see cref="Model"/> and <see cref="ModelExplorer.Model"/> 437/// <param name="value">New <see cref="Model"/> value.</param> 460else if (object.ReferenceEquals(value, Model))
ViewDataDictionaryOfT.cs (2)
91get => (base.Model is null) ? default! : (TModel)base.Model;
ViewDataEvaluator.cs (2)
53result = new ViewDataInfo(container: viewData, value: viewData.Model); 57result = EvalComplexExpression(viewData.Model, expression);
ViewResult.cs (1)
35public object? Model => ViewData?.Model;