1 write to Model
Microsoft.AspNetCore.Components.Web.Tests (1)
Forms\EditFormTest.cs (1)
36Model = new TestModel()
10 references to Model
Microsoft.AspNetCore.Components.Web (8)
Forms\EditForm.cs (8)
35/// also supply <see cref="Model"/>, since the model value will be taken 101if (_hasSetEditContextExplicitly && Model != null) 103throw new InvalidOperationException($"{nameof(EditForm)} requires a {nameof(Model)} " + 106else if (!_hasSetEditContextExplicitly && Model == null) 108throw new InvalidOperationException($"{nameof(EditForm)} requires either a {nameof(Model)} " + 124if (Model != null && Model != _editContext?.Model) 126_editContext = new EditContext(Model!);
Microsoft.AspNetCore.Components.Web.Tests (2)
Forms\EditFormTest.cs (2)
44Assert.StartsWith($"{nameof(EditForm)} requires a {nameof(EditForm.Model)} parameter, or an {nameof(EditContext)} parameter, but not both.", ex.Message); 58Assert.StartsWith($"{nameof(EditForm)} requires either a {nameof(EditForm.Model)} parameter, or an {nameof(EditContext)} parameter, please provide one of these.", ex.Message);