This change introduces a new property to ModelMetadata called IsBindingRequired, which specifies whether or not a model value must be present on the wire during model binding. [DataMember(IsRequired = true)] is currently the only thing that will set this property. Updated tests and documentation for clarity on the difference in meaning between MM.IsRequired and MM.IsBindingRequired. Moved setting for IsRequired to ValidationMetadata which is a better fit. Also added functional tests for [BindingBehavior] and [DataMember] in model binding because they were totally missing. |
||
|---|---|---|
| .. | ||
| Controllers | ||
| Models | ||
| Services | ||
| ViewModels | ||
| Views/Vehicle | ||
| wwwroot | ||
| AdditionalValuesMetadataProvider.cs | ||
| CaculatorContext.cs | ||
| DefaultCalculator.cs | ||
| DefaultCalculatorContext.cs | ||
| FromNonExistantBinderAttribute.cs | ||
| FromTestAttribute.cs | ||
| ICalculator.cs | ||
| ITestService.cs | ||
| ModelBindingWebSite.xproj | ||
| ModelMetadataExtensions.cs | ||
| Result.cs | ||
| Startup.cs | ||
| TestBindingSourceModelBinder.cs | ||
| TestService.cs | ||
| project.json | ||
| readme.md | ||
readme.md
ModelBindingWebSite
This web site illustrates how to use and configure various knobs of model binding to let the model binding system bind action parameters to the values which are present in the request. The website also uses model validation to validate the models created using model binding.