SQL Indexes

What are SQL Indexes? Indexes are used to help the SQL engine to identify faster the required data. There are associated with the data from the tables or the views. If you don’t have indexes on your columns that you use in the WHERE clause, then the database server has to query the entire table. For instance, you have a … Read more

Configure NLog in .NET Core Application

Nlog Advance Logging

NLog is a C# library used for logging. It is highly configurable, used by many projects. It supports by default various destinations for logs. I recommend using the NLog or Serilog. These two libraries are very similar and they have the most number of destinations already implemented. NLog configuration The configuration is built on three major properties: Target property sets … Read more

StringBuilder class in C#

Stringbuilder class in C#

When I learn to program, I remember that my professor told me that the String class is immutable. That means you cannot change the memory of that string. Every time you try to modify a string, a new memory allocation happens. Use StringBuilder instead of String operators When I was a junior programmer, every time when I have needed to … Read more

WebP Images in C# and ASP.NET

nature image webp format

What is a WebP image? WebP is a new format for images, developed by Google, which offers more efficient compression rates (up to 34% smaller) than the old formats like PNG and JPEG. Most of the websites load many big images. The speed of the website is slow. As a result, the traffic is impacted. All of my websites use … Read more

Background Tasks using Hangfire

Hangfire library

What Is Hangfire? Hangfire is a library that gives you the possibility to run scheduled tasks in the background without the interaction of the UI thread. This library is very similar to CRON jobs or the SQL Server Agent, so you can schedule different tasks. Millions of projects use it and it’s free. There is also a premium version available … Read more