aspnetcore/test/WebSites/ModelBindingWebSite
Ryan Nowak f5e7a69693 Updates to the extensibility for validator providers
This change removes reflection from validator providers, and instead
relies on cached metadata in in the modelmetadata.

In general this means that our MVPs don't need to cache anything, they
just look at the metadata and create what they need.

In the case of data-annotations, we update the model details provider to
add validation attributes to the modelmetadata. This would allow someone
to replace the DataAnnotationsValidatorProvider, but still use the
metadata in these attributes.

The change to the IModelValidatorProvider api (to use a context) is
intended to minimize allocations. Currently each validator provider needs
to return a list so you end up with N+1 lists (N validators + a final list
to compine them all). This change will let us just create the final list
(and a small context object). This is a very very high traffic API so it
seemed worth doing.

There's also some general massaging of namespaces and file locations.
2015-03-20 15:19:25 -07:00
..
Controllers Updates to the extensibility for validator providers 2015-03-20 15:19:25 -07:00
Models Bind POCO model correctly; fallback to empty prefix despite exact name match 2015-03-20 13:18:42 -07:00
Services
ViewModels
Views/Vehicle
wwwroot
AdditionalValuesMetadataProvider.cs Refactor of the model metadata provider 2015-03-05 13:19:10 -08:00
CaculatorContext.cs
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
ICalculator.cs
ITestService.cs
ModelBindingWebSite.xproj Update .kproj => .xproj. 2015-03-11 14:01:43 -07:00
ModelMetadataExtensions.cs
Result.cs
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
project.json Remove BOM from project.json, *.cmd, *.sh and *.shade files. 2015-03-09 12:56:42 -07:00
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.