AspNetCore.Docs/aspnetcore/web-api/define-controller/samples
Scott Addie 55f0638c56
2.2 updates to web API doc (#9303)
Fixes https://github.com/aspnet/Docs/issues/9298

**Summary of Changes**
* Display the "Problem details" section for 2.2+ only
* Restore the missing `Startup.ConfigureServices` code snippets
* Genericize the compat flag language
* Use the `ConfigureApiBehaviorOptions` method for the 2.2 doc
* Add content for `[assembly: ApiController]` in the 2.2 doc
* Expand upon default response type returned for 400 status codes
* Added a solution file for the sample app to improve usability
* A quick UE pass

**Internal Review Pages**
* [2.2](https://review.docs.microsoft.com/en-us/aspnet/core/web-api/?branch=pr-en-us-9303&view=aspnetcore-2.2#problem-details-responses-for-error-status-codes)
* [2.1](https://review.docs.microsoft.com/en-us/aspnet/core/web-api/?branch=pr-en-us-9303&view=aspnetcore-2.1#problem-details-responses-for-error-status-codes)
* [2.0](https://review.docs.microsoft.com/en-us/aspnet/core/web-api/?branch=pr-en-us-9303&view=aspnetcore-2.0#problem-details-responses-for-error-status-codes)
2018-10-30 13:01:52 -05:00
..
WebApiSample.Api.21 2.2 updates to web API doc (#9303) 2018-10-30 13:01:52 -05:00
WebApiSample.Api.22 2.2 updates to web API doc (#9303) 2018-10-30 13:01:52 -05:00
WebApiSample.Api.Pre21 Implicit versioning of the All package (#9223) 2018-10-25 15:16:50 -10:00
WebApiSample.DataAccess Convert synchronous web API methods to async (#7544) 2018-07-10 14:08:50 -05:00
README.md 2.2 updates to web API doc (#9303) 2018-10-30 13:01:52 -05:00
WebApiSample.sln 2.2 updates to web API doc (#9303) 2018-10-30 13:01:52 -05:00

README.md

ASP.NET Core Web API Controller Sample

This sample app consists of the following projects:

  • *WebApiSample.Api.22: An ASP.NET Core 2.2 project targeting .NET Core 2.2.
  • WebApiSample.Api.21: An ASP.NET Core 2.1 project targeting .NET Core 2.1.
  • WebApiSample.Api.Pre21: An ASP.NET Core 2.0 project targeting .NET Core 2.0.
  • WebApiSample.DataAccess: A .NET Standard 2.0 class library serving as a data access tier for the 2 Web API projects.

This sample illustrates variations of Web API controller creation: