StaffCoder
.NET
.NET.NET 10
12 modules · 48 challengesSign up
Modules12 modules · 48 challenges
Learn how a request turns into objects your code can trust: binding a JSON body to a typed record, pulling values from headers and the query string, stating the rules on the model itself, and reporting every field that failed.
Finish every challenge, or complete the star challenge, to complete the module.

Challenges

4 challenges

Registration Payload Binding

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

This problem covers binding a JSON request body to a typed record in a minimal API, so a body that cannot be read is answered with 400 before the handler runs.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Annotated Product Validation

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

This problem covers adding validation attributes to a model and answering an invalid one with validation problem details that name every failing field.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Header And Query Metadata Binding

Sign up to unlock
100%1 of 1 solvedeasy
About this challenge

This problem covers binding a required value from a request header and an optional value with a default from the query string straight into an action's parameters.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

Order Submission Endpoint

STAR
Solving it completes the module
100%1 of 1 solvedeasy
About this challenge

This problem covers binding a route id, a validated JSON body, a required header and an optional query value in one endpoint, and answering bad input with validation problem details naming each failing field.

Read the full problem
Solved in a browser IDE and graded by tests. Sign up to solve

We use cookies that are necessary to run Staffcoder, and optional analytics cookies to see which pages get used. Analytics stays off unless you accept. Read our Cookie Policy.