64 writes to Model
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (64)
DefaultHtmlGeneratorTest.cs (1)
1036
Model
= model,
DefaultValidationHtmlAttributeProviderTest.cs (1)
256
Model
= model,
ExpressionMetadataProviderTest.cs (1)
100
viewData.
Model
= myModel;
Rendering\DefaultTemplatesUtilities.cs (2)
120
viewData.
Model
= model;
205
viewData.
Model
= model;
Rendering\HtmlHelperCheckboxTest.cs (10)
285
helper.ViewData.
Model
= new TestModel();
306
helper.ViewData.
Model
= new TestModel();
328
helper.ViewData.
Model
= new TestModel();
349
helper.ViewData.
Model
= new TestModel();
370
helper.ViewData.
Model
= new TestModel { Property1 = true };
390
helper.ViewData.
Model
= new TestModel { Property1 = true };
595
viewData.
Model
= new TestModel
640
Model
= new ModelWithValidation()
799
helper.ViewData.
Model
= new TestModel { Property1 = true };
846
viewData.
Model
= new ModelWithValidation();
Rendering\HtmlHelperDropDownListExtensionsTest.cs (6)
83
helper.ViewData.
Model
= new TestModel { Property2 = "4" };
135
helper.ViewData.
Model
= new TestModel { Property2 = "5" };
158
helper.ViewData.
Model
= new TestModel { Property1 = 0 };
184
helper.ViewData.
Model
= new TestModel { Property2 = "5" };
209
helper.ViewData.
Model
= new TestModel { Property3 = new List<string> { "0", "2", "4" } };
235
helper.ViewData.
Model
= new TestModel { Property2 = "5" };
Rendering\HtmlHelperHiddenTest.cs (4)
895
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
913
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
931
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
954
Model
= new HiddenModel(),
Rendering\HtmlHelperListBoxExtensionsTest.cs (2)
59
helper.ViewData.
Model
= new TestModel { Property3 = new List<string> { "4" } };
131
helper.ViewData.
Model
= new TestModel { Property3 = new List<string> { "0", "4", "5" } };
Rendering\HtmlHelperPasswordTest.cs (4)
384
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
402
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
420
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
457
viewData.
Model
= new PasswordModel();
Rendering\HtmlHelperRadioButtonExtensionsTest.cs (3)
55
helper.ViewData.
Model
= new TestModel { Property1 = value };
75
helper.ViewData.
Model
= new TestModel { Property1 = value };
108
helper.ViewData.
Model
= new TestModel { Property2 = true };
Rendering\HtmlHelperSelectTest.cs (10)
428
viewData.
Model
= new ModelContainingSources { Property1 = SelectSources.PropertyOfModel };
465
viewData.
Model
= new ModelContainingSources { Property1 = SelectSources.PropertyOfModel };
491
viewData.
Model
= new ModelContainingSources { Property1 = SelectSources.PropertyOfModel };
518
viewData.
Model
= new ModelContainingSources { Property1 = SelectSources.PropertyOfModel };
545
viewData.
Model
= new ModelContainingSources { Property1 = SelectSources.PropertyOfModel };
831
viewData.
Model
= new ModelContainingListOfSources { Property1 = { SelectSources.PropertyOfModel } };
868
viewData.
Model
= new ModelContainingListOfSources { Property1 = { SelectSources.PropertyOfModel } };
894
viewData.
Model
= new ModelContainingListOfSources { Property1 = { SelectSources.PropertyOfModel } };
921
viewData.
Model
= new ModelContainingListOfSources { Property1 = { SelectSources.PropertyOfModel } };
948
viewData.
Model
= new ModelContainingListOfSources { Property1 = { SelectSources.PropertyOfModel } };
Rendering\HtmlHelperTextAreaExtensionsTest.cs (5)
22
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
41
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
60
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
79
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
99
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
Rendering\HtmlHelperTextBoxExtensionsTest.cs (5)
23
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
41
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
59
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
77
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
95
helper.ViewData.
Model
= new TestModel { Property1 = "propValue" };
ViewDataDictionaryOfTModelTest.cs (10)
37
Model
= model
212
Model
= 23,
270
Model
= -48,
311
Model
= model,
337
viewData1.
Model
= 23;
338
viewData2.
Model
= 24;
339
viewData3.
Model
= 25;
360
viewData1.
Model
= null;
361
viewData2.
Model
= null;
362
viewData3.
Model
= null;
70 references to Model
Microsoft.AspNetCore.Mvc.Razor (1)
RazorPageOfT.cs (1)
18
public TModel Model => ViewData.
Model
;
Microsoft.AspNetCore.Mvc.Razor.Test (1)
RazorPageCreateModelExpressionTest.cs (1)
360
return ModelExpressionProvider.CreateModelExpression(ViewData, m => ViewData.
Model
);
Microsoft.AspNetCore.Mvc.RazorPages.Test (2)
ApplicationModels\DefaultPageApplicationModelProviderTest.cs (2)
498
public EmptyPage Model => ViewData.
Model
;
520
public EmptyPageModel Model => ViewData.
Model
;
Microsoft.AspNetCore.Mvc.ViewFeatures (6)
IModelExpressionProvider.cs (2)
16
/// <typeparam name="TModel">The type of the <paramref name="viewData"/>'s <see cref="ViewDataDictionary{T}.
Model
"/>.</typeparam>
18
/// <param name="viewData">The <see cref="ViewDataDictionary{TModel}"/> containing the <see cref="ViewDataDictionary{T}.
Model
"/>
ModelExpressionProvider.cs (2)
66
/// <typeparam name="TModel">The type of the <paramref name="viewData"/>'s <see cref="ViewDataDictionary{T}.
Model
"/>.</typeparam>
67
/// <param name="viewData">The <see cref="ViewDataDictionary{TModel}"/> containing the <see cref="ViewDataDictionary{T}.
Model
"/>
ViewDataDictionaryOfT.cs (2)
38
/// but <see cref="
Model
"/> should be copied from the existing instance e.g. when copying from a base
62
/// <see cref="
Model
"/> are known.
Microsoft.AspNetCore.Mvc.ViewFeatures.Test (59)
Rendering\HtmlHelperHiddenTest.cs (20)
67
helper.ViewData.
Model
.Property1 = "should-not-be-used";
83
helper.ViewData.
Model
.Property1 = "model-property1-value";
101
helper.ViewData.
Model
.Property1 = "model-property1-value";
118
helper.ViewData.
Model
.Property1 = "model-property1-value";
136
helper.ViewData.
Model
.Property1 = "model-property1-value";
200
helper.ViewData.
Model
.Property1 = "test-value";
216
helper.ViewData.
Model
.Property1 = "property-value";
232
helper.ViewData.
Model
.Property1 = "property-value";
247
helper.ViewData.
Model
.Property1 = "property-value";
264
helper.ViewData.
Model
.Property1 = "property-value";
588
helper.ViewData.
Model
.Bytes = new byte[] { 23, 43, 53 };
603
helper.ViewData.
Model
.Property1 = "test";
618
helper.ViewData.
Model
.Property1 = "DefaultValue";
634
helper.ViewData.
Model
.Property1 = "PropertyValue";
649
helper.ViewData.
Model
.Property1 = null;
682
helper.ViewData.
Model
.Property1 = "propValue";
701
helper.ViewData.
Model
.Property1 = "propValue";
804
viewData.
Model
.Property3["key"] = "ModelProp3Val";
805
viewData.
Model
.Property4.Property5 = "ModelProp5Val";
806
viewData.
Model
.Property4.Property6.Add("ModelProp6Val");
Rendering\HtmlHelperPasswordTest.cs (10)
42
viewData.
Model
.Property1 = "does-not-get-used";
183
vdd.
Model
.Property1 = "property-value";
260
helper.ViewData.
Model
.Property1 = "test";
291
vdd.
Model
.Property1 = "prop1-value";
362
viewData.
Model
.Property3["key"] = "prop-value1";
363
viewData.
Model
.Property4.Property5 = "prop-value2";
364
viewData.
Model
.Property4.Property6.Add("prop-value3");
515
helper.ViewData.
Model
.Property3["key"] = "Prop3Val";
516
helper.ViewData.
Model
.Property4.Property5 = "Prop5Val";
517
helper.ViewData.
Model
.Property4.Property6.Add("Prop6Val");
Rendering\HtmlHelperTextAreaTest.cs (6)
77
helper.ViewData.
Model
.Property3["key"] = "Prop3Val";
78
helper.ViewData.
Model
.Property4.Property5 = "Prop5Val";
79
helper.ViewData.
Model
.Property4.Property6.Add("Prop6Val");
128
helper.ViewData.
Model
.Property3["key"] = "Prop3Val";
129
helper.ViewData.
Model
.Property4.Property5 = "Prop5Val";
130
helper.ViewData.
Model
.Property4.Property6.Add("Prop6Val");
Rendering\HtmlHelperTextBoxTest.cs (6)
95
helper.ViewData.
Model
.Property3["key"] = "Prop3Val";
96
helper.ViewData.
Model
.Property4.Property5 = "Prop5Val";
97
helper.ViewData.
Model
.Property4.Property6.Add("Prop6Val");
146
helper.ViewData.
Model
.Property3["key"] = "Prop3Val";
147
helper.ViewData.
Model
.Property4.Property5 = "Prop5Val";
148
helper.ViewData.
Model
.Property4.Property6.Add("Prop6Val");
ViewDataDictionaryOfTModelTest.cs (15)
24
Assert.Null(viewData.
Model
);
51
Assert.Same(model, viewData1.
Model
);
90
Assert.Null(viewData1.
Model
);
147
Assert.Same(model, viewData.
Model
);
170
Assert.Equal(0, viewData.
Model
);
281
Assert.Equal(viewData.
Model
, viewData.ModelExplorer.Model);
282
Assert.Equal(model, viewData.
Model
);
322
Assert.Equal(viewData.
Model
, viewData.ModelExplorer.Model);
323
Assert.Equal(model, viewData.
Model
);
343
Assert.Equal(23, viewData1.
Model
);
344
Assert.Equal(24, viewData2.
Model
);
345
Assert.Equal(25, viewData3.
Model
);
366
Assert.Null(viewData1.
Model
);
367
Assert.Null(viewData2.
Model
);
368
Assert.Null(viewData3.
Model
);
ViewDataOfTTest.cs (2)
46
Assert.Same(value, viewDataOfT.
Model
);
63
Assert.Null(viewData.
Model
);
RazorBuildWebSite.Views (1)
Pages\Rzc\Page.cs (1)
38
public Page_Model Model => ViewData.
Model
;