When the service receives a model (say, via a POST message) MVC validates it to ensure the model is in a correct state. Validation currently incurs in many allocations that can be avoided. This tackles two of them: 1. We're now caching the generic `GetEnumerator<T>` method infos generated on the fly during collection validation, and 2. We're now only initializing `ModelErrorCollection` on demand. The first one incurs in the additional allocation of 1 long-lived dictionary object, which will grow only to the amount of `Collection<T>` types used by the model being validated. This is expected to be a small to medium number. The second change assumes that class `ModelStateEntry` isn't thread safe, as model validation isn't multithreaded. This resolves #4434 and #4435. |
||
|---|---|---|
| samples/MvcSandbox | ||
| src | ||
| test | ||
| tools | ||
| .gitattributes | ||
| .gitignore | ||
| .travis.yml | ||
| CONTRIBUTING.md | ||
| LICENSE.txt | ||
| Mvc.NoFun.sln | ||
| Mvc.sln | ||
| NuGet.config | ||
| NuGetPackageVerifier.json | ||
| README.md | ||
| Settings.StyleCop | ||
| appveyor.yml | ||
| build.cmd | ||
| build.ps1 | ||
| build.sh | ||
| global.json | ||
README.md
ASP.NET Core MVC
ASP.NET Core MVC gives you a powerful, patterns-based way to build dynamic websites that enables a clean separation of concerns and gives you full control over markup for enjoyable, agile development. ASP.NET Core MVC includes many features that enable fast, TDD-friendly development for creating sophisticated applications that use the latest web standards.
ASP.NET Core MVC in ASP.NET Core includes support for building web pages and HTTP services in a single aligned framework that can be hosted in IIS or self-hosted in your own process.
Related community projects:
- AspNet.Mvc.TypedRouting: A collection of extension methods providing strongly typed routing and link generation for ASP.NET Core MVC projects.
- ASP.NET MVC Boilerplate: Rich templates for ASP.NET Core MVC.
This project is part of ASP.NET Core. You can find samples, documentation and getting started instructions for ASP.NET Core at the Home repo.