aspnetcore/test/WebSites/ModelBindingWebSite
Doug Bunting 533474d07c Bind POCO model correctly; fallback to empty prefix despite exact name match
- #1865
- change `MutableObjectModelBinder` to ignore exact match in value providers
 - had an incorrect assumption: don't want exact model name to match since
   this binder supports only complex objects
 - also ignored `BinderModelName`, value provider filtering, et cetera
- reduces over-binding e.g. `[Required]` validation within missing properties

also add more tests of #2129 scenarios
2015-03-20 13:18:42 -07:00
..
Controllers Bind POCO model correctly; fallback to empty prefix despite exact name match 2015-03-20 13:18:42 -07:00
Models Bind POCO model correctly; fallback to empty prefix despite exact name match 2015-03-20 13:18:42 -07:00
Services Adding additional functional tests for ModelBinding 2014-12-16 12:25:37 -08:00
ViewModels Add `ModelMetadata.AdditionalValues` property bag 2015-02-09 15:59:34 -08:00
Views/Vehicle Use `[Display(Order=x)]` to sort validation messages and properties 2015-01-29 09:31:05 -08:00
wwwroot Fixing Readme 2015-02-19 10:20:16 -08:00
AdditionalValuesMetadataProvider.cs Refactor of the model metadata provider 2015-03-05 13:19:10 -08:00
CaculatorContext.cs Adding FromServicesAttribute. 2014-11-26 15:35:08 -08:00
DefaultCalculator.cs Logging API changes 2015-03-04 21:07:45 -08:00
DefaultCalculatorContext.cs Additional functional tests for ElementalValueProvider 2015-02-25 10:22:43 -08:00
FromNonExistantBinderAttribute.cs Removing ModelMetadataProvider.GetModelMetadataForParameters 2015-03-19 16:42:54 -07:00
FromTestAttribute.cs Make BindingSource extensible 2015-02-05 13:41:31 -08:00
ICalculator.cs Adding FromServicesAttribute. 2014-11-26 15:35:08 -08:00
ITestService.cs Adding Support for TryUpdateModel using include expressions and predicate. 2014-12-05 17:28:43 -08:00
ModelBindingWebSite.xproj Update .kproj => .xproj. 2015-03-11 14:01:43 -07:00
ModelMetadataExtensions.cs Add `ModelMetadata.AdditionalValues` property bag 2015-02-09 15:59:34 -08:00
Result.cs Fix for #563 - FromForm, FromQuery and FromValue allow providing a Name which is used as a prefix. Also the name is used for reporting model state errors. 2015-02-18 16:48:12 -08:00
Startup.cs React to hosting changes 2015-03-19 11:07:25 -07:00
TestBindingSourceModelBinder.cs Refactor of the model metadata provider 2015-03-05 13:19:10 -08:00
TestService.cs Adding Support for TryUpdateModel using include expressions and predicate. 2014-12-05 17:28:43 -08:00
project.json Remove BOM from project.json, *.cmd, *.sh and *.shade files. 2015-03-09 12:56:42 -07:00
readme.md Fixing Readme 2015-02-19 10:20:16 -08:00

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.