When building enterprise applications in C#, a common architectural trap is writing procedural code disguised as object-oriented code. This usually happens when we rely entirely on anemic data bags (public get; set; DTOs) for business logic, forcing our application services to manage all validation and state changes manually.
Is this you? As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.
Claim your profile
Articles by Spyros Ponaris
EF Core Mapping for DDD — for Dummies
Spyros Ponaris Tech Lead | Senior Software Engineer | .NET Enthusiast (BSc, MSc, MCP, MCSD) Contact Information: https://www.linkedin.com/in/spyros-ponaris-913a6937/ Location Athens Education BSc University of Sunderland- MSc University of Greenwich Pronouns Tech Lead and Senior Software Engineer with a strong focus on .NET technologies. Work Tech Lead | Senior Software Engineer | Joined
Building a Clean Master-Detail App with Blazor Server, MudBlazor, and EF Core
Building a Clean Master-Detail App with Blazor Server, MudBlazor, and EF Core When building business applications, one of the most common requirements is a master-detail workflow. Orders and order items are a perfect example. You need a clean list view, a reliable detail page, inline editing, validation, filtering, and a structure that can grow without becoming messy. That is exactly what BlazorOrderApp is designed to demonstrate.
Chain of Responsibility pattern
Chain of Responsibility About 8 years ago I came across the Chain of Responsibility pattern. I remember I was genuinely happy when I understood it, because all those long if / else if / else blocks suddenly felt unnecessary. Instead of one method trying to decide everything, you build a small chain of handlers. Each handler either handles the request, or passes it to the next one. Wikipedia describes it as a source of requests and a series of processing objects.
🚀 Parallel.ForEachAsync vs Task.Run in C#: A Beginner’s Guide
When you start writing C# code that needs to do things at the same time, two methods often come up: Task.Run Parallel.ForEachAsync At first, they both look like “magic ways to run things in parallel.” But actually, they are built for different jobs. Let’s explore them step by step. First things first: what do they do?
Stop Killing Your Database with Multiple Calls
We’ve all seen it. A single API endpoint makes three, four, sometimes ten separate queries to load one page. The developer is “being clever” by running them in parallel with Task.WhenAll or async calls. From the client’s perspective, it feels faster. From the database’s perspective, you just gave it four times the work for the same result. Quick Note: What is Dapper? Dapper is a micro-ORM (Object Relational Mapper) for .NET, created by the Stack Overflow team.
🔄 Creating a Syncfusion MultiSelect Component with Two-Way Binding in Blazor
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 avoid unnecessary updates 💡 Why This Pattern? Often in enterprise forms, you need a dynamic dropdown that updates based on a type and preselects values passed from a parent.
⚔️ The Mighty MERGE: Using SQL Merge Statements Safely with EF Core
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: ✅ What MERGE is and why it matters 🔁 How to use it with EF Core (with and without transactions) ⚠️ Common pitfalls and best practices 🛠️ Alternatives like BulkExtensions and PostgreSQL upserts 🧠 When to use MERGE — and when not to 🧠 What Is SQL MERGE?
Why Records in C# Are Game-Changing
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 data. But what actually makes them great? Hereβs why records arenβt just nice β theyβre game-changing. π§ What Are Records? At their core, records are reference types designed for immutable data modeling.
Task.Run vs await: What Every C# Developer Should Know
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, deadlocks, and wasted threads. Let’s break it down. What is a Task? In C#, a Task represents an asynchronous operation. It acts like a promise: something that might complete in the future and optionally return a value.
🖥️ Understanding Serverless Architecture and Azure Functions
🌐 Introduction Serverless architecture is reshaping how we build and scale applications. It abstracts away server management, allowing developers to focus purely on business logic. One of the key tools in this ecosystem is Azure Functions, Microsoft’s serverless compute service.
Mastering Blazor Component Communication: EventCallback, CascadingParameter, and @ref Explained
Blazor brings modern component-based architecture to .NET developers, enabling rich, interactive UIs using Razor components. But like any component model, communication between components is key.
Mastering EF Core Interceptors: Hook into the Pipeline with the Decorator Pattern
Learn how to tap into Entity Framework Core’s execution pipeline using interceptors, leverage the Decorator Pattern for clean cross-cutting concerns, and explore practical examples like SQL logging and auditing in action. 📚 Table of Contents A Brief History of EF Core Interceptors What Are EF Core Interceptors?
Optimistic vs. Pessimistic Concurrency in EF Core (with Table Hints)
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 handles concurrency tokens is essential for building scalable and safe data operations, especially in systems with high transaction rates. Concurrency control determines how multiple users or processes interact with the same data simultaneously.
Setting Up MediatR in a Minimal API
Introduction MediatR simplifies CQRS (Command Query Responsibility Segregation) by decoupling request handling logic in a Minimal API. This tutorial will guide you through setting up MediatR in an ASP.NET Core Minimal API.
Why Does Everyone Forget Java and C# for Backend Development? Why Don’t Full-Stack Developers Learn Java and C#?
Why Does Everyone Forget Java and C# for Backend Development? Why Don’t Full-Stack Developers Learn Java and C#? In recent years, backend development discussions have been dominated by languages like JavaScript (Node.js), Python, and even Go. Yet, Java and C#—two of the most robust and battle-tested backend technologies—often get overlooked. Why is that? My Experience: Java as a Junior Developer I started my career as a junior Java developer and still remember using NetBeans.
In my previous article, I covered validation in Minimal APIs, but security is just as important. Most applications rely on JWT authentication for securing APIs, so in this article, Iโll walk you through how to create an Identity Service for JWT authentication. ๐ Note: This article will not include ASP.NET Core Identity. If you're interested in a separate article on that, let me know, and Iโll add an implementation to my GitHub repo.
In my previous article, I focused on benchmarking Minimal APIs against Controllers. GitHub Repository You can find the full project and source code on GitHub. The journey continues, and the next step is to explore how to implement validation in Minimal APIs. Key Consideration: No ModelState One important thing to note is that Minimal APIs do not have a ModelState like controllers do. This raises the question: how can we validate a simple DTO?
Minimal API Performance Benchmark
Inspired by the insightful article How to Increase Performance of Web APIs in .NET by Anton Martyniuk, I decided to create a minimal project to test the performance of Minimal APIs in .NET. This project benchmarks Minimal APIs against Controllers, focusing on real-world scenarios like lightweight requests and data processing. Goals of the Project Compare the performance of Minimal APIs and traditional Controllers. Evaluate their suitability for high-performance web applications.
Using Options Pattern in ASP.NET Core
In ASP.NET Core, the Options Pattern provides a clean way to manage configuration settings by binding them to strongly-typed objects. This allows for easy dependency injection and centralized management of application settings.
What is ValueTask?
ValueTask is a structure introduced in .NET for scenarios requiring micro-optimizations in asynchronous programming. It provides an alternative to Task with better performance for specific use cases, such as when the result of an asynchronous operation is already available or can be synchronously produced. Key Characteristics: ValueTask can be used for both asynchronous and synchronous results, while Task is inherently asynchronous.
Understanding and Using Table Hints in SQL Server
Table hints in SQL Server are powerful tools for controlling how queries interact with data, locks, and the SQL Server query optimizer. This tutorial will guide you through the basics of table hints, their use cases, and how to use them effectively while avoiding common pitfalls. What Are Table Hints? Table hints are directives applied to specific tables in a query. They influence locking behavior, query execution, and concurrency.
Understanding the State Pattern
<h1>Understanding the State Pattern</h1> <h2>Introduction</h2> <p>The State Pattern is a behavioral design pattern that allows an object to change its behavior when its internal state changes. This pattern is particularly useful when an object must exhibit different behavior based on its current state, eliminating complex conditional logic.</p> <h2>Key Concepts</h2> <ul> <li> State: Represents a state of the context. This is an interface or an abstract class.
Strategy Pattern
The Strategy Pattern is a behavioral design pattern that enables the selection of an algorithm at runtime from a family of algorithms. By encapsulating each algorithm and making them interchangeable, the pattern ensures that the client using the algorithm can remain decoupled from the specific implementation. This makes the pattern especially useful for scenarios where behavior may vary dynamically. Why Use the Strategy Pattern?
Show More
loading
Actions
Is this you?
As a journalist, you can create a free Muck Rack account to customize your profile, list your contact preferences, and upload a portfolio of your best work.Get in touch with Spyros
Contact Spyros, search articles and posts on X, monitor coverage, and track replies from one place.
Learn more about Muck Rack