You can write better controllers by adhering to the best practices. So-called “thin” controllers—i.e. controllers with less code and fewer responsibilities—are easier to read and maintain. And once ...
To build and execute the programs in this article, you should have Visual Studio 2017 and ASP.NET Core 2.1 or later installed in your system. If you don't have Visual Studio installed, you can get a ...
Short, short tip: If you're working in an ASP.NET Core controller you may not have noticed that you have some new methods for generating a response to go back to the client: Ok, Created, NotFound and ...
You can take advantage of custom route constraints in ASP.NET Core to validate route values and avoid passing unwanted or unnecessary requests to action methods. Route constraints in ASP.NET Core are ...