Debugging your .NET application more easily

As a programmer, you often have to debug your code, or the code written by a coworker. I don't like debugging, but as you know: If debugging is the process of removing bugs, then programming must be the process of putting them in. Unless you are extraordinary developer, you'll need to debug your code. Visual Studio provides great tools to help you in this task. The main features are breakpoints, step by… [read more]

Testing an ASP.NET Core application using TestServer

When Microsoft has designed ASP.NET Core, testing was clearly part of the design. Using dependency injection, you can unit test your middlewares and controllers. But you can also use the TestServer to make integration tests. This means you can test your full web application without an IIS server or any external thing. It's a fully in process server. A simple example will be much clearer. Let's use the… [read more]

Entity Framework Core: History / Audit table

Some applications need to keep a list of all the changes in a table. You can implement this functionality by adding triggers in the database or by using native features of the RDBMS such as Temporal tables or Change Data Capture). Let's see how you can implement a similar functionnalities in C# with Entity Framework Core in a provider agnostic way! Note: The following code has been tested with Entity… [read more]