ASP.NET Core – Self-hosted service stub with a command line interface

When you’re integrating with a third-party API, you may want to send requests to a service stub instead of sending them to the real API. The purpose of a service stub is to simulate the third-party API by returning hardcoded responses. This is similar to how mocks are used in unit testing – it helps … Read more

ASP.NET Core – How to turn off startup logging

When you launch an ASP.NET Core web app, you may see the following startup logging messages: These messages come from having a console logger. If you’re using Host.CreateDefaultBuilder(), it adds a console logger provider by default. There are two simple ways to get rid of these logging messages: turn off logging in appsettings.json or remove … Read more