Latest Posts On Code Maze

How to Build Dynamic Queries With Expression Trees in C#

How to Build Dynamic Queries With Expression Trees in C#

Applications are becoming more complex and data-driven over time. Indeed, developing the ability to create and modify dynamic queries at runtime is becoming a critical skill for developers. In this article, we'll explore the basics of building dynamic query expression...

How to Send Emails With the SendGrid API in C#

How to Send Emails With the SendGrid API in C#

In this article, we will take a look at how to send emails with the SendGrid API directly from our code. Sending emails from within our applications is a common scenario that we face as developers. Let's look at a couple of use cases where we may need to do this. .NET versions can be confusing, especially if you're new to .NET. Take...

Using System.Text.Json for Camel Case Serialization

Using System.Text.Json for Camel Case Serialization

In this article, we'll learn how to use System.Text.Json for camel case serialization in .NET 7. First, we'll take a glance at the default behavior when serializing. Then we'll use two different ways for the camel case serialization. Lastly, we'll discuss how we can...

How to Generate Permutations in C#

How to Generate Permutations in C#

In this article, we will examine the world of algorithms. Specifically, we will talk about an algorithm that we can use to generate permutations. ...

Swashbuckle vs. NSwag in ASP.NET Core

Swashbuckle vs. NSwag in ASP.NET Core

In this article, we will explore the two popular libraries for generating OpenAPI documentation in C#: Swashbuckle and NSwag. We'll compare their features, ease of use, and other factors that will help us choose the best one for our projects. The newest feature of the Microsoft.Extensions.Hosting...

Structured Logging in ASP.NET Core With log4net

Structured Logging in ASP.NET Core With log4net

Log4net is a very popular open-source logging library for .NET applications. This library is part of the Apache Logging Services project at the Apache Software Foundation. Log4net provides a flexible way of writing logs to different output targets like files,...

How to Reverse a String in C#

How to Reverse a String in C#

Reversing a string is a common task in programming, and C# provides several ways to accomplish it. Whether we need to reverse a string for sorting purposes, to improve search efficiency, or for any other reason, understanding how to perform this operation in C# is an...

Compare DateTime in C#

Compare DateTime in C#

In C#, several methods and operators are available to compare DateTime. In this article, we will learn about them along with the best practices. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/dotnet-datetime/CompareDateTimeInCSharp"...

ML.NET – Introduction to Machine Learning With C#

ML.NET – Introduction to Machine Learning With C#

In this article, we will provide an overview of machine learning and explain how ML.NET enables it. We will learn how to build, train, and optimize a simple machine-learning model. Finally, we will see how the model can be used in a real-life application. [sc...

URI Encode and Decode in .NET

URI Encode and Decode in .NET

In this article, we are going to learn about URI encode and decode and how we can achieve this using .NET. So, let's start. What is URI...