20 questions for “Model Binding & Validation”

Found in 1 field. Select a question to see its full answer.

Information Technology

20 questions in 1 technology

#QuestionTechnologyTopicLevel
1How do you share validation logic between a Blazor form (using EditForm and DataAnnotationsValidator) and a corresponding ASP.NET Core Web API's model validation? ASP.NET Core › Blazor Integration with ASP.NET CoreASP.NET CoreBlazor Integration with ASP.NET CoreIntermediate
2How does model binding work differently between controllers (using [FromBody], [FromQuery] attributes) and minimal APIs (using parameter inference)? ASP.NET Core › Controllers vs Minimal APIsASP.NET CoreControllers vs Minimal APIsIntermediate
3How do you implement equivalent cross-cutting concerns (like automatic model validation) in minimal APIs that [ApiController] provides automatically for controllers? ASP.NET Core › Controllers vs Minimal APIsASP.NET CoreControllers vs Minimal APIsAdvanced
4How does exception handling middleware interact with model validation errors, and why do they typically produce two entirely separate error response paths? ASP.NET Core › Error HandlingASP.NET CoreError HandlingAdvanced
5What HTTP status code and response should be returned when an upload fails validation (wrong type, too large, missing file)? ASP.NET Core › File Uploads & Streaming Large FilesASP.NET CoreFile Uploads & Streaming Large FilesBeginner
6How would you implement a custom route constraint (IRouteConstraint) for a domain-specific validation pattern, like a product SKU format? ASP.NET Core › Endpoint Metadata, Route Constraints & TemplatesASP.NET CoreEndpoint Metadata, Route Constraints & TemplatesAdvanced
7What is a route template in ASP.NET Core, and how do route parameters like {id} work within one? ASP.NET Core › Endpoint Metadata, Route Constraints & TemplatesASP.NET CoreEndpoint Metadata, Route Constraints & TemplatesBeginner
8How do you accept a file upload in an ASP.NET Core controller action using IFormFile? ASP.NET Core › File Uploads & Streaming Large FilesASP.NET CoreFile Uploads & Streaming Large FilesBeginner
9How do you customize example values shown in Swagger UI for request and response bodies? ASP.NET Core › API Documentation with Swagger/OpenAPIASP.NET CoreAPI Documentation with Swagger/OpenAPIIntermediate
10What features do controllers provide out of the box that minimal APIs don't have native equivalents for? ASP.NET Core › Controllers vs Minimal APIsASP.NET CoreControllers vs Minimal APIsIntermediate