Become a

.NET Pro

while drinking coffee

Every Monday morning, start the week with a cup of coffee and 1 actionable .NET tip that you can use right away.

Join 14,250+ subscribers to improve your .NET Knowledge.

Blog header image

TheCodeMan.NET

previous issues

Dec 16 2024
Read Time: 3 minutes

.NET 9 introduces exciting enhancements to LINQ (Language Integrated Query), adding new methods - Index, CountBy, and AggregateBy...
.NET 9 - New LINQ Methods

Dec 08 2024
Read Time: 6 minutes

Caching is a mechanism to store frequently used data in a temporary storage layer so that future requests for the same data can be served faster, reducing the need for repetitive data fetching or computation.
HybridCache in ASP.NET Core - .NET 9

Nov 25 2024
Read Time: 3 minutes

The Chain of Responsibility pattern is a behavioral design pattern that allows you to build a chain of objects to handle a request or perform a task.
Chain Responsibility Pattern

Nov 23 2024
Read Time: 3 minutes

C# 13 continues the evolution of Microsoft’s flagship programming language, introducing a range of features aimed at improving code expressiveness, developer productivity, and overall performance.
Exploring C# 13

Nov 18 2024
Read Time: 4 minutes

Feature Flags are one of the most powerful techniques to achieve this, enabling developers to toggle features on or off without deploying new code.
Feature Flags in .NET 8 with Azure Feature Management

Nov 04 2024
Read Time: 4 minutes

While convenient, this approach can pose security risks if not handled properly.  Azure Key Vault offers a secure, managed solution for secret storage, allowing us to keep sensitive data out of local files and within a secure cloud environment.
Securing Secrets in .NET 8 with Azure Key Vault

Oct 28 2024
Read Time: 3 minutes

LINQ (Language Integrated Query) is a powerful feature in C# that lets developers perform complex queries easily across various data sources like databases, collections, and XML...
LINQ Performance Optimization Tips & Tricks

Oct 08 2024
Read Time: 4 minutes

The core idea of a Singleton is that it is a class designed to only create one instance of itself, and it typically provides an easy way to access that instance.
Using Singleton in Multithreading in .NET

September 30 2024
Read Time: 3 minutes

Guard clauses in .NET are a programming practice used for improving the readability and reliability of code...
How to create .NET Custom Guard Clause

September 24 2024
Read Time: 4 minutes

CQRS (Command Query Responsibility Segregation) is a design pattern that separates the read (query) and write (command) operations of an application, leading to better maintainability, scalability, and flexibility.
How to implement CQRS without MediatR

September 16 2024

If you are a beginner (seniors, wait a bit, there will be something for you too, and until then you can remind yourself) and you use EF Core, I strongly recommend you to go through this issue, and look at the code and benchmarks...
4 Entity Framework Tips to improve performances

September 2 2024

The Request, Endpoint, Response (REPR) pattern is a modern architectural approach often used in web development to design robust, scalable, and maintainable APIs...
REPR Pattern - For C# developers

August 27 2024

Refit is a REST API client library for .NET that allows you to define an API as an interface in your application...
Refit - The .NET Rest API you should know about

August 22 2024

I'm not sure if I know any programmer, engineer, architect, or even HR who doesn't know who Uncle Bob is and what the Clean Code book is....
6 ways to eleveate your 'clean' code

August 12 2024

Source generators are components that run during the compilation process to inspect your code and generate additional C# source files.
Deep dive into Source Generators

August 10 2024

Swashbuckle is an open-source project that integrates Swagger with .NET applications. It provides seamless support for generating Swagger documents and exposing them via a web interface in ASP.NET Core applications.
3 Tips to Elevate your Swagger UI

August 10 2024

.NET memory caching is a feature used to store objects in memory for faster access. This can significantly improve the performance of applications, especially those that frequently access data from databases, web services, or other time-consuming data retrieval sources.
Memory Caching in .NET

August 10 2024

In C#/.NET, a DelegatingHandler is a special type of message handler that is part of the HTTP client pipeline used to process HTTP requests and responses.
Solving HttpClient Authentication with Delegating Handlers

July 11 2024

The Strategy pattern is a behavioral design pattern that defines a family of algorithms, encapsulates each one, and makes them interchangeable.
Strategy Design Pattern will help you refactor code

July 04 2024
Read Time: 5 minutes

Explore Stefan Đokić's insightful blog post on API Key Authentication in ASP.NET Core...
How to implement API Key Authentication

June 24 2024

SAGA is a sequential process that manages transactions between microservices by breaking each operation into multiple smaller transactions that can be independently executed and compensated.
Saga Orchestration Pattern

June 10 2024

The IOptions pattern is part of the Microsoft.Extensions.Options namespace and provides a way to define a configuration class and bind settings from various sources such as appsettings.json files, environment variables, or command-line arguments.
Live loading appsettings.json configuration file

June 03 2024

Polly is a .NET resilience and transient-fault-handling library that allows developers to express policies such as Retry, Circuit Breaker, Timeout, Bulkhead Isolation, and Fallback in a fluent and thread-safe manner.
Retry Failed API calls with Polly

May 27 2024

In the beginning I used Automapper constantly and it was a great replacement for the tedious work of typing mapping code...
How and why I create my own mapper (avoid Automapper)?

Apr 08 2024
Read Time: 3 minutes

The IServiceCollection interface represents a contract for a collection of service descriptors, providing an abstraction to add, remove, and retrieve services...
The ServiceCollection Extension Pattern

Apr 01 2024
Read Time: 3 minutes

We often don't see the mistakes we're making, or we don't see ways to potentially optimize the code. And there are many of them....
3 things you should know about Strings

Mar 25 2024
Read Time: 4 minutes

An API Gateway acts as a gatekeeper for your APIs, managing requests from clients (such as web or mobile apps) to your backend services...
Api Gateways - The secure bridge for exposing your api

Mar 18 2024
Read Time: 5 minutes

In November 2023, C# 12 arrived with a bang, bundled with .NET 8, bringing with it a bunch of cool new features that have made developers sit up and take notice...
5 cool features in C# 12

Mar 11 2024
Read Time: 4 minutes

IP whitelisting is a security measure used to control access to networks, servers, and services, including APIs...
Allow specific users to access your API - Part 2

Mar 04 2024
Read Time: 4 minutes

Just as a bouncer checks your pass before letting you into a club, an API uses an API key to decide who gets access to its data and services.
Allow specific users to access your API - Part 1

Feb 19 2024
Read Time: 6 minutes

Since there's a limited amount of network bandwidth available...
Response Compression in ASP.NET

Jan 29 2024
Read Time: 4 minutes

An API Gateway is a component of the app-delivery infrastructure that sits between clients...
API Gateway with Ocelot

Jan 08 2024
Read Time: 4 minutes

Health Checks in ASP.NET are a way to assess the health of an application and its dependencies...
Health Checks in .NET 8

Jan 1 2024
Read Time: 3 minutes

MediatR is a popular library in .NET used for implementing the Mediator pattern. It helps in reducing coupling between components...
MediatR Pipeline Behavior

Dec 25 2023
Read Time: 3 minutes

PLINQ queries are similar to regular LINQ queries, but they're designed to run faster by using all the processors on your computer...
Getting Started with PLINQ

Dec 18 2023
Read Time: 7 minutes

The GraphQL is a query language for our API that allows us to define the data structure we need, and the server will return only the requested data.
Get Started with GraphQL in .NET

Dec 11 2023
Read Time: 6 minutes

Exceptions are designed to handle unexpected and rare events...
Better Error Handling with Result<T> object

Dec 04 2023
Read Time: 7 minutes

A Background Task in .NET typically refers to any operation that runs in the background...
Background Tasks in .NET 8

Dec 04 2023
Read Time: 4 minutes

How to optimize the EF Core queries? Write them properly the first time. We often hear about optimizing a piece of code, or a query, and it mostly refers to refactoring code that wasn't written well from the beginning.
Pre-Optimized EF Query Techniques 5 Steps to Success

Nov 20 2023
Read Time: 2 minutes

Compiled queries in .NET emerged as a response to the performance challenges faced in data retrieval operations, particularly in applications using ORMs like Entity Framework.
Improve EF Core Performance with Compiled Queries

Nov 13 2023
Read Time: 9 minutes

A project workflow is like a roadmap that guides you from the very beginning of a project all the way to its successful...
How do I implement a workflow using a .NET workflow engine?

Nov 06 2023
Read Time: 4 minutes

API versioning is a technique used to manage changes in an API while maintaining backward compatibility for existing clients...
What is and why do you need API Versioning?

Oct 30 2023
Read Time: 2 minutes

With the release of .NET 6, there's a new tool in town called LoggerMessageAttribute...
Compile-time logging source generation for highly performant logging

Oct 23 2023

In .NET, background tasks are asynchronous operations that run independently of the main application thread...
Background tasks and how to use them. Stale Cache example in C#

Oct 16 2023

gRPC, which stands for Google Remote Procedure Call, is an open-source, high-performance framework for...
Unlock the Power of High-Performance Web Applications with gRPC

Oct 9 2023
Read Time: 3 minutes

Cross-Origin Resource Sharing (CORS) is a security feature implemented by web browsers that controls how web pages in one domain can request resources, like APIs, from another domain...
Using CORS in your applications

Oct 02 2023
Read Time: 5 minutes

Hashids are an effective approach for generating opaque non-sequential IDs derived from numbers/sequential IDs (e.g., Integer) and hashing algorithms; converting numbers like 347 into an opaque strings identifier such as 'ir8'.
HashIDs. What are they, and why should we use them?

Sep 25 2023

We often find ourselves in a situation where a certain method or part of the code does not work as we want in terms of execution speed on the CPU...
Benchmarking in .NET Step by step

Sep 18 2023

Middleware in the context of web development is a piece of software that sits between two or more software applications or layers...
How do I create Middleware? And what are the alternatives?

Sep 11 2023
Read Time: 5 minutes

MediatR is a popular open-source library for implementing the Mediator pattern in .NET applications...
How to use MediatR Notifications email

Aug 28 2023
Read Time: 5 minutes

FluentEmail is a popular open-source library for sending emails from .NET applications...
How to send email in 5min with FluentEmail?

Aug 21 2023
Read Time: 6 minutes

SignalR is like that cool tech wizard in the .NET, making real-time communication feel like a piece of cake...
Real-Time applications with SignalR

Aug 14 2023
Read Time: 2 minutes

This blog post delves into the use of Architecture Tests in software development, emphasizing their role in maintaining code integrity and design consistency, especially in .NET environments...
Use Architecture Tests in your projects

May 15 2023
Read Time: 5 minutes

Traditional plain-text logs can be hard to read and analyze...
Structured Logging with Serilog

Apr 24 2023
Read Time: 4 minutes

SOLID is an acronym for a set of 5 design principles that help improve the maintainability, scalability, and stability of software systems...
SOLID Principles in .NET

Apr 17 2023
Read Time: 6 minutes

Hangfire is an open-source library for .NET that provides a simple way to perform background processing in your application...
Jobs in .NET with Hangfire

Apr 10 2023
Read Time: 8 minutes

Security headers are HTTP response headers that provide an additional layer of security to web applications. They help to protect against attacks such as cross-site scripting (XSS), clickjacking, and more.
Make your .NET application secure

Apr 3 2023

Imagine creating a .NET API project that you call in a front-end web or mobile application...
How to put localhost online in Visual Studio?

March 27 2023

A rate limiter is a software mechanism that controls the amount of traffic or requests that can be sent to a server or API within a given time period...
How to implement a Rate Limiter in C#

March 20 2023

I'm not sure if I know any programmer, engineer, architect, or even HR who doesn't know who Uncle Bob is and what the Clean Code book is...
Clean Code - Best Practices

March 13 2023

The SAGA pattern is used to manage transactions across multiple services in a distributed system...
SAGA Implementation in C#

March 06 2023

A Webhook is a mechanism that allows a web application to send real-time notifications or data to another web application...
GitHub Webhook with C#

February 20 2023
Read Time: 3 minutes

ChatGPT (Generative Pre-trained Transforer) is a large language model developed by OpenAI. It is designed to understand natural language ...
How to use ChatGPT in C# application?

February 13 2023
Read Time: 2 minutes

Reference types in C# have always been nullable, meaning that variables of any reference type can be assigned a value of null...
4 methods to handle Nullable Reference in .NET

Subscribe to
TheCodeMan.net

Subscribe to the TheCodeMan.net and be among the 14,250+ subscribers gaining practical tips and resources to enhance your .NET expertise.


Join 14,250+ subscribers to improve your .NET Knowledge.