Latest Posts On Code Maze

Difference Between String, FormattableString, IFormattable in C#

Difference Between String, FormattableString, IFormattable in C#

C# provides different ways of manipulating strings, which can be helpful when designing and implementing systems. So, in this article, we will delve deep into the distinctions among String, FormattableString, and IFormattable in C#. Besides that, we will test whether...

Code Maze Weekly #183

Code Maze Weekly #183

Issue #183 of the Code Maze weekly. Check out what's new this week and enjoy the read. .NET and C# Top Picks 9 "hidden" features in Visual Studio that you may not know [blog.elmah.io] Visual Studio is a great tool. But it has so many...

Dynamically Switching DbContext at Runtime Using Entity Framework Core

Dynamically Switching DbContext at Runtime Using Entity Framework Core

In this article, we will discuss why having multiple databases behind an application is useful and how dynamically switching an EF DbContext can be achieved without experiencing downtime. Feel free to check out our series of articles on Entity Framework Core. Clean and easy-to-implement guide to logging with Serilog using Azure...

How to Mark Methods as Deprecated in C#

How to Mark Methods as Deprecated in C#

In this article, we will explore how we can mark methods as deprecated and propose newer alternatives to developers in C# by providing useful information. A good breakdown of Moq's situation for those that haven't heard what's...

Prevent SQL Injection With EF Core, Dapper, and ADO.NET

Prevent SQL Injection With EF Core, Dapper, and ADO.NET

SQL Injection is a severe security vulnerability that can harm applications that use databases. In this article, we'll learn about SQL Injection attacks, what they can do, and how to protect our applications from them. We'll focus on using popular ORM tools like EF...