aspnetcore/test/WebSites/ModelBindingWebSite
Doug Bunting c4fa402105 Add `ModelBindingResult.IsFatalError` and make body binding more consistent
- part I of II for #2445 (with a duplicate code PR to follow)
- needed for #2445 because new `ModelState` entries for values will make inconsisteny worse
- change `BodyModelBinder` to use same keys for all `ModelBindingResult`s and `ModelState` entries
 - return fatal error result if formatter adds an error to `ModelState`
 - update potential callers to avoid avoid ignoring `IsFatalError`
- fix test attempting to serialize all of `ModelState`
 - will be borked with additional `RawValue`s in state
- fix two other tests that serialized `ModelState` but checked only `IsValid`

nits:
- address minor inconsistencies in `ModelBindingContext`
- use `System.Reflection.Extensions` package a bit more, where it's already referenced
- remove some unused resources
2015-06-18 16:19:01 -07:00
..
Controllers Add `ModelBindingResult.IsFatalError` and make body binding more consistent 2015-06-18 16:19:01 -07:00
Models SerializerSettings refactor 2015-05-11 16:43:17 -07:00
Services Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
ViewModels Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
Views/Vehicle
wwwroot
AdditionalValuesMetadataProvider.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
CaculatorContext.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
DefaultCalculator.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
DefaultCalculatorContext.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
FromNonExistantBinderAttribute.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
FromTestAttribute.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
ICalculator.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
ITestService.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
ModelBindingWebSite.xproj
ModelMetadataExtensions.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
Result.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
Startup.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
TestBindingSourceModelBinder.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
TestService.cs Update LICENSE.txt and license header on files. 2015-05-01 13:55:25 -07:00
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.