ASP.NET Core – Log messages to the database in the background

I was reading about logging in ASP.NET when I came across this statement about logging to the database: When logging to SQL Server, don’t do so directly. Instead, add log messages to an in-memory queue and have a background worker dequeue and insert data to SQL Server. Paraphrased from https://docs.microsoft.com/en-us/aspnet/core/fundamentals/logging/?view=aspnetcore-5.0#no-asynchronous-logger-methods In this article, I’ll show … Read more

C# – Using ManualResetEventSlim and AutoResetEvent to signal waiting threads

In software development there are many ways to solve the same problem. It’s all about knowing what options are available and using the simplest approach for the job. When you want one or more threads to wait until they are signaled before continuing, how do you do it? There are many options that you can … Read more