1. Introduction
When you’re using EF Core in production, query compilation can quietly become a performance bottleneck — especially if the same query is executed thousands of times.
Normally, EF Core parses your LINQ, generates SQL, and prepares ...
In this example, we build a reusable Blazor component using Syncfusion’s SfMultiSelect that supports:
Dynamic option filtering based on a Picklist type e.g., Color, Unit
Two-way data binding with a parent component
Internal state management to avo...
When you’re working with bulk data operations, upserts, or syncing external sources, MERGE is one of the most powerful tools SQL Server offers. But what happens when you need to use it alongside Entity Framework Core?
In this article, we’ll cover:
...
Modern C# development is built on asynchronous code. But even seasoned developers often confuse await with Task.Run. While they both deal with tasks, their purposes are entirely different. Misusing one for the other can lead to performance issues, de...
Is the Repository Pattern Dead?
Introduction
The repository pattern has been a cornerstone of enterprise .NET architecture for years. It promised clean separation between business logic and data access, testability, and maintainability. But with mo...
Why Records in C# Are Great
If you’ve been working with C# lately, you’ve probably encountered records , a feature introduced in C# 9 that many developers have come to love.
They’re elegant, powerful, and remove a lot of boilerplate when modeling...
Exploring Actions, Effects, and the Benefits of Fluxor
Modern web applications are becoming increasingly complex, and with complexity comes the need for structured state management. In the world of Blazor a popular .NET-based web UI framework .
Flu...
Blazor1 is a modern framework from Microsoft that allows you to build interactive web applications using C# and .NET, both on the server and the client, without needing JavaScript. It brings the full power of .NET to the browser via WebAssembly or se...
Many experienced developers are familiar with database transactions but often overlook the key differences between optimistic and pessimistic concurrency control in Entity Framework Core EF Core.
Understanding both approaches and how EF Core handle...
Entity Framework Core 7 introduced two powerful methods for bulk operations:
ExecuteUpdateAsync and ExecuteDeleteAsync.
These methods are designed for high-performance scenarios where you need to update or delete multiple records efficiently with...
Learn how to hook into EF Core operations using interceptors, leverage the Decorator Pattern for clean cross-cutting concerns, and see real-world examples like SQL logging and auditing.
Table of Contents
A Brief History of EF Core Interceptors
Wha...
Introduction
The Observer Pattern is a behavioral design pattern that allows an object the subject to notify multiple other objects observers about state changes. It is commonly used in event-driven programming, messaging systems, and real-time noti...
When working with Entity Framework Core EF Core, there are different strategies for loading related data from the database.
So, how do you load a collection or other related objects?
Here are the main options:
1️⃣ Eager Loading Include
Loads rela...
Entity Framework Core EF Core Global Query Filters allow you to apply filters to queries at the model level so that they automatically apply to all queries involving a specific entity.
This is particularly useful for scenarios like soft deletes, mu...
When working with Entity Framework Core EF Core, queries that involve multiple Include statements can result in a single large query with multiple joins. This can cause performance issues due to data duplication and increased memory usage.
What is A...
Equality is a crucial concept in C#, and handling it efficiently can improve performance and correctness in applications. In this article, we'll focus on IEquatable, why it is preferable over Equals and ==, and how records in C# inherently support va...
Understanding the State Pattern with Calculator
Introduction
The State Pattern allows an object to change its behavior dynamically based on its internal state. It’s a powerful design pattern for handling complex, state-dependent behavior in an or...