liveBook · Manning

Complex type parameter

As explained in Building Web APIs with ASP.NET Core

A complex type parameter is an action method parameter represented by an object whose properties can be bound and validated individually.

A complex type parameter packages related action inputs into one object, allowing each property to bind and validate like an individual simple parameter. section 6.1.5

Use a DTO when an action needs several related inputs:

  • Create a RequestDTO with properties such as PageIndex, PageSize, SortColumn, SortOrder, and FilterQuery. section 6.1.5

Board-game listing request

The Get action reads input.PageIndex, input.PageSize, input.SortColumn, input.SortOrder, and input.FilterQuery to construct a paginated, filtered, sorted query.

How Building Web APIs with ASP.NET Core covers it

How deep it goes
Explains DTO creation, property attributes, query binding, defaults, and generic validation, but does not detail the full binding pipeline.
Examples
Uses RequestDTO for pagination, filtering, sorting, default values, and BoardGamesController query construction.
What it assumes
Assumes basic action parameters and introduces grouping inputs into DTO properties with binding and validation behavior.
What you can do after
Apply it via ASP.NET Core model binding to replace long parameter lists with validated, extensible request objects.
How it connects
Connects model binding, validation attributes, DTOs, query strings, Swagger generation, and generic validation.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Building Web APIs with ASP.NET Core. The section links point to the parts of the book it draws on.