Summary
In this chapter, you saw how to use FluentValidation
to validate input properties before executing code for the API.
You saw how to create rules, how to chain them, and how to ensure that a second rule in a chain is not evaluated if the first fails.
You learned two ways of dealing with errors – testing the return error or throwing an exception – and you saw how to create a custom error message.
In the next chapter, we will turn our attention to Azure Functions – a critical part of programming APIs in .NET. Following that, we will look at Durable Azure Functions and what they add to Azure Functions.