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)
58
pageContext.ViewData.
Model
= result.Model;
PageBase.cs (1)
1187
Model
= model,
PageModel.cs (1)
1545
Model
= model,
Microsoft.AspNetCore.Mvc.ViewFeatures (3)
Controller.cs (2)
144
ViewData.
Model
= model;
197
ViewData.
Model
= model;
ViewDataDictionaryOfT.cs (1)
92
set => base.
Model
= value;
120 references to Model
Microsoft.AspNetCore.Mvc.RazorPages (1)
PageResult.cs (1)
23
public object Model => ViewData?.
Model
!;
Microsoft.AspNetCore.Mvc.TagHelpers (1)
PartialTagHelper.cs (1)
177
return ViewContext.ViewData.
Model
;
Microsoft.AspNetCore.Mvc.ViewFeatures (118)
Controller.cs (2)
119
return View(viewName, model: ViewData.
Model
);
172
return PartialView(viewName, model: ViewData.
Model
);
DefaultDisplayTemplates.cs (9)
21
if (htmlHelper.ViewData.
Model
!= null)
23
value = Convert.ToBoolean(htmlHelper.ViewData.
Model
, CultureInfo.InvariantCulture);
74
var model = htmlHelper.ViewData.
Model
;
150
if (htmlHelper.ViewData.TemplateInfo.FormattedModelValue == htmlHelper.ViewData.
Model
)
153
string.Format(CultureInfo.CurrentCulture, "{0:0.00}", htmlHelper.ViewData.
Model
);
161
var uriString = "mailto:" + ((htmlHelper.ViewData.
Model
== null) ?
163
htmlHelper.ViewData.
Model
.ToString());
279
var uriString = (htmlHelper.ViewData.
Model
== null) ? string.Empty : htmlHelper.ViewData.
Model
.ToString();
DefaultEditorTemplates.cs (7)
27
if (htmlHelper.ViewData.
Model
!= null)
29
value = Convert.ToBoolean(htmlHelper.ViewData.
Model
, CultureInfo.InvariantCulture);
57
var model = viewData.
Model
;
133
if (htmlHelper.ViewData.TemplateInfo.FormattedModelValue == htmlHelper.ViewData.
Model
)
136
string.Format(CultureInfo.CurrentCulture, "{0:0.00}", htmlHelper.ViewData.
Model
);
145
var model = viewData.
Model
;
423
var value = htmlHelper.ViewData.
Model
;
DefaultHtmlGenerator.cs (1)
1497
if (value == null || value == viewContext.ViewData.
Model
)
ExpressionMetadataProvider.cs (3)
157
viewDataInfo.Value == viewData.
Model
&&
204
var model = viewData.
Model
== null ? null : Convert.ToString(viewData.
Model
, CultureInfo.CurrentCulture);
HtmlHelperOfT.cs (1)
73
ViewData = new ViewDataDictionary<TModel>(viewContext.ViewData, viewContext.ViewData.
Model
);
PartialViewResult.cs (1)
35
public 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)
32
return htmlHelper.PartialAsync(partialViewName, htmlHelper.ViewData.
Model
, viewData: null);
55
return htmlHelper.PartialAsync(partialViewName, htmlHelper.ViewData.
Model
, viewData);
97
return Partial(htmlHelper, partialViewName, htmlHelper.ViewData.
Model
, viewData: null);
120
return Partial(htmlHelper, partialViewName, htmlHelper.ViewData.
Model
, viewData);
184
RenderPartial(htmlHelper, partialViewName, htmlHelper.ViewData.
Model
, viewData: null);
203
RenderPartial(htmlHelper, partialViewName, htmlHelper.ViewData.
Model
, viewData);
265
return htmlHelper.RenderPartialAsync(partialViewName, htmlHelper.ViewData.
Model
, viewData: null);
288
return 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)
193
return View(viewName, ViewData.
Model
);
ViewComponentResult.cs (1)
41
public 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>
460
else if (object.ReferenceEquals(value,
Model
))
ViewDataDictionaryOfT.cs (2)
91
get => (base.
Model
is null) ? default! : (TModel)base.
Model
;
ViewDataEvaluator.cs (2)
53
result = new ViewDataInfo(container: viewData, value: viewData.
Model
);
57
result = EvalComplexExpression(viewData.
Model
, expression);
ViewResult.cs (1)
35
public object? Model => ViewData?.
Model
;