Execute JavaScript Using Selenium WebDriver in C#
As developers, we always look for ways to make our work easier so we can focus on more exciting projects or learn new things. A big part of this is finding ways to quickly test our work, like new features or bug fixes, to ensure everything runs smoothly. This is where...
Introduction to Autofac FakeItEasy Package
In this article, we'll learn about the Autofac FakeItEasy Package, its features, benefits, and how to get started. We'll learn how to use the package to create unit tests for our applications. [sc name="github"...
Querying MongoDB With ObjectId in C#
In this article, we will look at how to retrieve MongoDB documents using ObjectId in C#. We will only cover how to query a MongoDB database using ObjectId in C#. Check out our article Getting Started with ASP.NET Core and MongoDB for more information on how to set up...
Custom Naming Policy for JSON in C#
In this article, we are going to learn why and how to customize property names in JSON. First, we will look at the default behavior to find out why we might need to customize our JSON output. After that, we will implement a custom naming policy. [sc name="github"...
Using the CLI to Build and Run .NET Applications
In this article, we will learn more about how to use the CLI to build and run .NET applications. Whether taking our first steps in cross-platform development based on the .NET common language runtime (CLR), or brushing up on some basics to explore a different way to...
Publishing Blazor WebAssembly App to IIS
In this article, we will learn how to publish a Blazor WebAssembly application on IIS. Let's dive in. Setting up the App Blazor has three hosting...
How to Get an Access Token from HttpContext in ASP.NET Core
In this article, we will learn different ways to get an Access Token from HttpContext. Let's start. Understanding the HttpContext In...
Select a Dropdown Option Using Selenium WebDriver in C#
In this article, we will look at different ways to select a dropdown option using Selenium WebDriver in C#. We will use ASP.NET Core application and xUnit tests to showcase different approaches to our goal. [sc name="github"...
File Access Modifier in C#
In this article, we will learn about the File Access Modifier in C#. We will focus on what problems it solves and how to use it. ...
How to Decode JWT Tokens in .NET
In today's interconnected web ecosystem, all communicating parties must ensure secure authentication and data exchange. One popular and reliable method for transmitting information between parties in a compact and verifiable manner is through JSON Web Tokens (JWTs)....
Tuple Aliases in C#
In this article, we will take an in-depth look at tuple aliases: what they are, how to use them, and the different rules that apply to them. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/csharp-intermediate-topics/TupleAliasInCSharp"...
Create Better Looking Console Applications With Spectre.Console
In this article, we will explore how to create better-looking console applications with Spectre.Console. By default, console applications in .NET have a monochromatic user interface. However, with the Spectre.Console package, we can enhance their visual appeal by...
Blazor WebAssembly Ahead of Time Compilation
In this article, we will explore the concept of ahead-of-time (AOT) compilation in Blazor WebAssembly projects. We'll explain how to enable AOT compilation, how it operates, and when it proves effective. Additionally, we'll look at how it optimizes applications with...
Hexagonal Architectural Pattern in C#
In this article, we are going to describe the hexagonal architectural pattern. We will explain its structure, where it came from, and its advantages and disadvantages. Furthermore, we will demonstrate its implementation in C#. [sc name="github"...
How to Rename Files in a Folder in C#
In this article, we will learn how to efficiently rename single or multiple files in a folder using C#, making file management easier and more organized. [sc name="github"...
How to Switch Between .NET SDK Versions
In this article, we will learn how to switch between .NET SDK versions in our projects. By default, .NET uses the latest SDK installed on a given machine, even when developing with an earlier .NET runtime version. Actually, we can benefit from the latest SDK features...
How to Insert and Return Inserted Identity With Dapper
In this article, we will learn how to insert a record in an SQL database and return the inserted identity using Dapper. Let's begin!...
Local Functions in C#
In this article, we will learn about the local functions in C#. We'll explore the significance of local functions and how we can create them. Furthermore, we will discuss the best practices and compare them with lambda expressions. [sc name="github"...
How To Read the Request Body in ASP.NET Core Web API
ASP.NET Core offers a versatile request-response pipeline, allowing seamless customization and intervention. Managing incoming requests to read the request body in an ASP.NET Core Web API application is a common and crucial task. There are multiple methods and...
How to Determine the Operating System in .NET Core
In this article, we are going to find out how to determine the operating system of a computer on which our .NET Core application is running. [sc name="github" url="https://github.com/CodeMazeBlog/CodeMazeGuides/tree/main/dotnet-base-libraries/DetermineOperatingSystem"...
How to Use Request Timeouts Middleware in ASP.NET Core
In this article, we'll explore what the request timeouts middleware in ASP.NET Core does, how we can use it, as well as some advanced features we can leverage. [sc name="github"...



