Code Maze Weekly #138
Issue #138 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Top Picks Customize The Authorization Pipeline In ASP.NET Core [khalidabuhakmeh.com] Although ASP.NET Core comes with powerful authorization features, that makes it...
Filtering Results Using Filtered Include Method in EF Core
In this article, we are going to learn about Filtered Include in Entity Framework Core, what operations it supports, and what are its use cases. If you've tried to implement a secure GRPC API service in ASP.NET Core...
How to Test a REST API with .NET and xUnit
In this article, we are going to cover how and why we should test a REST API with .NET and xUnit. We'll discuss why this is important, and how to actually test various components of an API response to ensure requirements are being met. Sometimes we need multiple static file folders in our projects. Let's see how we...
Web API Return Types in ASP.NET Core
In this article, we are going to learn about different return types that we can use with ASP.NET Core Web API controller actions. So let's start...
How to Create a Class Dynamically in C#?
In this article, we are going to learn how to create a class dynamically in C#. Thanks to the introduction of the dynamic type in C# 4, working with dynamic classes has become easier, but we shouldn't abuse it. Dynamic classes are very powerful, but they bring a...
Different Ways to Add Values to a C# Array
In this article, we are going to learn about the different ways we can add values to a C# array. Let's dive in. We've emphasized that exception handling is an essential part of development over and...
Two-Factor Authentication With SMS in ASP.NET Core
In this article, we will learn how to set up two-factor authentication using SMS in ASP.NET Core. We have previously covered Two-Step Verification with ASP.NET Core Identity using Email. This article is a continuation that uses generated code provided by ASP.NET Core...
How to Execute Multiple Tasks Asynchronously in C#
In this article, we are going to learn how to execute multiple tasks in C# in sequence and parallel. By using async/await, we avoid performance bottlenecks and enhance the scalability of our application. Depending on the business logic, we may need to execute...
How to Build a Multitenant Application with ASP.NET Core
In this article, we are going to learn how to build a multitenant application with ASP.NET Core. What is Multitenancy To better understand...
Dependency Injection With Simple Injector in .NET
Simple Injector is a .NET library that enables developers to apply dependency injection into their code. Moreover, Simple Injector supports different platforms including .NET 4.5 and up, .NET Standard, UWP, Mono, .NET Core, and Xamarin. We can all agree that string interpolation was an excellent addition to C#. But did you know...
Heap Sort in C#
In this article, we'll look at the heap sort algorithm in C#. We'll discuss what the algorithm is, how it works, and see some code examples that demonstrate how to implement it. Finally, we'll discuss its time and space complexity and compare the algorithm to other...
Flags Attribute For Enum in C#
In this article, we are going to learn about the Flags attribute for enum in C#, what its benefits are, and how to use it in a practical example. Need to send a lot of emails at once? Here's one way to do it Niels Swimberghe. Just make...