Service Lifetime in Dependency Injection

In this blog post, I am going to discuss the Dependency Injection Service Lifetime. In the out-of-box Dependency Injection container in .NET Core or .NET 5.0, there are three main service lifetime options available. The main focus of this blog post will be discussing the details of each of the three service lifetime that comes … Read more

RabbitMQ in .Net Core

RabbitMQ is an open-source message broker. And it is probably one of the most widely used message brokers out there. In my experience, it is one of the most robust message brokers. It is extremely easy to install and use. RabbitMQ is extremely lightweight and very easy to deploy. It supports multiple protocols. It is … Read more

Hangfire Job Scheduling in ASP.Net Core 3.0

A lot of times, we need to create applications that need some sort of time-based scheduling. Hangfire helps us right there. Hangfire provides a very easy and fluent way to create and manage scheduled jobs. The disadvantage of creating a solution for scheduling job from scratch are the following: Firstly, it is usually cumbersome and … Read more

gRPC in ASP.Net Core

gRPC is an open-source, high-performance RPC framework. In this blog, I am going to cover gRPC in ASP.Net Core. We can use gRPC within or across data centers. We can use gRPC in mobile applications, web applications as well as edge computing as a backend service. Google was the first to develop gRPC, later it … Read more

Middleware in ASP.Net Core

Middleware in ASP.Net Core is software components that are assembled into the HTTP pipeline to handle requests and response. A middleware component can either choose to pass the request to the next component in the pipeline. Or it may choose to end the request. Middleware can perform tasks both before as well as after the … Read more

ASP.Net Core Authorization (Role-based and Policy-based Authorization)

In this blog, I am going to take a deep-dive into ASP.Net Core Authorization. Authorization is the process to find out what action a user can perform. In the case of a REST API, it can be the resources a user can access. Or a particular HTTP verb associated with a resource. For example, let … Read more

Redis Cache in .Net Core – Docker Container

Using a caching solution becomes important when we are building a high performant web-based application or micro-services system. I wrote about using Memcached as a distributed caching solution in my previous blog. In today’s blog, I am going to take a deep dive into Redis Cache as a distributed in-memory caching solution for .Net Core. … Read more

Deep dive into Default Interface methods in C# 8

In this blog, I am going to deep dive into Default Interface Methods in C# 8. This was released along with .Net Core 3.0 in September 2019. I have covered this topic briefly previously in my blog https://dotnetcorecentral.com/blog/c-8-my-top-5-favorite-features-which-i-absolutely-love/. But at that time I was not sure of the potential of this feature. Now, after going … Read more

Nullable reference types in C# 8

Nullable reference types is the default behavior of reference types in C# 7.3 and below versions. Well, what do I mean by that? When we declare reference types, pre-C# 8, it’s always nullable, meaning it can be assigned a null value. Hence we need to check it against null to avoid NullReferenceException. The newly introduced … Read more

NLog with Splunk in Docker

Logging is a crucial part of any application. In this blog, I will walk through using NLog and Splunk for application logging. Traditionally we used to use file-based logging. But with container-based application saving logs to a file is not a good strategy. In enterprise, there is the use of log collectors, which is provided … Read more