Latest Posts On Code Maze

How to Log a Class and Method Names Using Serilog

How to Log a Class and Method Names Using Serilog

Developers must implement an efficient logging system to maintain and troubleshoot applications effectively. One popular logging library that provides powerful logging capabilities is Serilog. In this article, we will talk about how to log class and method names using...

New Features in C# 12

New Features in C# 12

In this article, we will explore new features in C# 12. We will describe primary constructors, collection expressions, inline arrays, and other newly introduced features.  We'll need the latest Visual Studio 2022 or .NET 8 SDK to try each of these new C# 12 features,...

Using Fluxor for State Management in Blazor

Using Fluxor for State Management in Blazor

In this article, we will review the Flux pattern with its benefits, and drawbacks in general. Then we will take a look into how Fluxor implements this pattern. Finally, we will learn how to use the library using an example Blazor application. Since the .NET Core term is fading away slowly, let's remember how it...

Parsing HTML With AngleSharp in C#

Parsing HTML With AngleSharp in C#

In this article, we will be exploring parsing HTML with AngleSharp in C#. AngleSharp is a powerful library in C# that gives us the ability to parse angle bracket-based hyper-texts like HTML, SVG, MathML, as well as XML. Our focus in this article will be to introduce...

Comparing for and foreach Loops in C#

Comparing for and foreach Loops in C#

In this article, we will compare the for and foreach loops. Iterating through arrays and lists is fundamental when learning any programming language. C# offers different ways to achieve this, such as using while, for, and foreach statements. But, what about the...

How to Get appsettings.json Content as a Dictionary in ASP.NET Core

How to Get appsettings.json Content as a Dictionary in ASP.NET Core

When working with ASP.NET Core applications, storing configuration settings in the appsettings.json file is common. While the appsettings.json file offers a convenient way to structure configuration data; there is a common need to retrieve this data in a format that...

Tools and Best Practices for Secret Management in .NET

Tools and Best Practices for Secret Management in .NET

In this article, we will talk about the tools and best practices for secret management in .NET applications. Every application has values it wishes to keep hidden. One of the critical aspects of security in software development is how we handle secrets. Examples of...

Lazy Loading and Eager Loading in Entity Framework Core

Lazy Loading and Eager Loading in Entity Framework Core

In this article, we will learn about the loading strategies we can employ in EF Core. These strategies, namely Lazy Loading and Eager Loading control how data is fetched from the database. We will also delve into performance impacts and considerations for choosing one...

How to Correctly Implement IDisposable Interface in C#

How to Correctly Implement IDisposable Interface in C#

In this article, we will show how to correctly implement the IDisposable interface. We will focus on key aspects with a clear explanation. The IDisposable interface in managed code gives us a tool to manage resource cleanup. By implementing IDisposable, we can also...

How to Divide Data Into Batches With LINQ

How to Divide Data Into Batches With LINQ

In software development, it is often necessary to divide data into manageable batches for more efficient processing and improved application performance. In this article, we will look at some approaches to dividing data into batches using LINQ methods, with the C#...

Probabilistic Programming in C# With Infer.NET

Probabilistic Programming in C# With Infer.NET

With the increasing progress and interest in AI and Machine Learning, keeping track of and understanding the technologies behind powerful AI and ML systems is essential. One of these technologies is Probabilistic Programming. In this article, we will learn what it is...