The concept of kata in software development has been around for years. The idea is to memorize and improve your coding skills through repetition and practice.
Sometimes when using EF Core with an existing database, the underlying database structure can change without you knowing. Here is how you can verify the structure of the database matches the code.
When developing and maintaining ASP.NET Core applications, it is possible you will encounter timeouts with the deployed application. If you are using IIS to host the application, it is helpful to know how it all strings together.
In the first part of this mini-series, I showed how I created a simulated HttpContext for a controller action unit test. In this post I wanted to describe how I added a ClaimsPrincipal implementation.
The ASPNET Core approach to processing HTTP requests is to abstract as much as possible. As a result, it is rare that you have to use anything but POCO classes when processing a request with a controller action. All the HTTP-ness is nicely hidden behind model binders and value providers that parses the incoming request (query string, form, body, url, etc.). This makes it possible to unit test your controllers without having to create mock implementations of the HTTP request itself (ie. the HttpContext).
But this doesn’t work in all cases.