From 92565aa6c983e08f17d8dade2c6c25be0791332a Mon Sep 17 00:00:00 2001 From: Rick Anderson Date: Mon, 14 Jan 2019 16:36:57 -1000 Subject: [PATCH] Update index.md (#10388) Fixes https://github.com/aspnet/Docs/issues/9051 --- aspnetcore/web-api/index.md | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/aspnetcore/web-api/index.md b/aspnetcore/web-api/index.md index 543c84b08f..c61958a9b7 100644 --- a/aspnetcore/web-api/index.md +++ b/aspnetcore/web-api/index.md @@ -127,7 +127,9 @@ A binding source attribute defines the location at which an action parameter's v > [!WARNING] > Don't use `[FromRoute]` when values might contain `%2f` (that is `/`). `%2f` won't be unescaped to `/`. Use `[FromQuery]` if the value might contain `%2f`. -Without the `[ApiController]` attribute, binding source attributes are explicitly defined. In the following example, the `[FromQuery]` attribute indicates that the `discontinuedOnly` parameter value is provided in the request URL's query string: +Without the `[ApiController]` attribute, binding source attributes are explicitly defined. Without `[ApiController]` or other binding source attributes like `[FromQuery]`, the ASP.NET Core runtime attempts to use the complex object model binder. The complex object model binder pulls data from value providers (which have a defined order). For instance, the 'body model binder' is always opt in. + +In the following example, the `[FromQuery]` attribute indicates that the `discontinuedOnly` parameter value is provided in the request URL's query string: [!code-csharp[](define-controller/samples/WebApiSample.Api.21/Controllers/ProductsController.cs?name=snippet_BindingSourceAttributes&highlight=3)] @@ -239,3 +241,4 @@ Use the `ClientErrorMapping` property to configure the contents of the `ProblemD * * * +****