architecture
C# and .NET Design Patterns Articles, Tutorials & News
C# and .NET Design Patterns articles, tutorials, and news from the DotNetNews archive.
432 articles Updated Page 6 of 18
Browse additional C# and .NET Design Patterns articles from the DotNetNews archive.
C# and .NET Design Patterns articles
Page 6 of 18
Newest first
-
A Customer Got Charged Three Times. The Scary Part? My Code Worked Exactly as Written.
Medium Issue #488
No exception. No crash. No bug in the logs. The code did precisely what I told it to. And a customer’s card got hit three times for the…
-
Design Principles Every Senior .NET
Medium Issue #488
Stop writing code that works today and breaks tomorrow. Here are the principles that separate senior engineers from the rest.
-
Implementing the Result Pattern in C# Using Discriminated Unions
Medium Issue #488
The Simplest Way to Master Your Flow Control
-
Designing AI-Native Service Architectures with ASP.NET Core
C# Corner Issue #487
Design AI-native service architectures with ASP.NET Core for scalable, resilient enterprise AI applications. Learn principles, patterns, and implementation.
-
Stop Writing Factory Switch Statements: Resolving Strategies with Attributes and Reflection
Medium Issue #487
In Part 1 of this series, we took a 50+ case switch statement and turned it into a family of small, independently testable strategy…
-
-
Stop Writing Switch Statements for Approval Workflows: The Strategy Pattern in Practice
Medium Issue #487
If you’ve built any kind of approval workflow — leave requests, expense claims, role changes, vendor onboarding — you already know how it…
-
Implementing Event-Driven Microservices in .NET:
Medium Issue #486
This guide provides a comprehensive, step-by-step walkthrough for implementing a resilient event-driven messaging system using MassTransit…
-
Stop throwing exceptions for control flow: the Result railway in C#
Medium Issue #486
“This order ID does not exist” is not an exceptional event, it is a routine branch of normal control flow. Here is the Result railway…
-
Decorating Strategies: Adding Permission Checks Without Touching Business Logic
Medium Issue #486
Part 1 of this series replaced a 50+ case switch statement with a family of strategy classes. Part 2 replaced a second switch statement —…
-
Dependency Injection & Agent Framework
YapCast – Jesse Liberty Issue #486
In the previous blog posts we ported a Python implementation of an agentic application to C# and Microsoft Agent Framework. We used interfaces, but we did not use Dependency Injection (DI). It is pret...
-
LoopAgent Class Explained Building Autonomous AI Agents with .NET and MAF - Ep 12
C# Corner Issue #486
Learn how the LoopAgent class works in Microsoft Agent Framework and how to build autonomous AI agents with .NET. This session explains iterative agent workflows, autonomous decision-making, execution...
-
The Day Deposits Doubled: Idempotency, Race Conditions, and a Lock That Saved Us
Medium Issue #485
A real war-room story about duplicated deposits in production — why a check-then-insert idempotency guard isn’t enough under concurrency…
-
Build your own claw and agent harness with Microsoft Agent Framework
Microsoft Dev Blogs Issue #485
What does it take to build your own "claw" - a capable, CLI-style agent that can plan, use tools, remember things, and safely act on your behalf? Coding agents and assistants like these can feel like ...
-
Designing AI-Native Background Processing Systems with ASP.NET Core
C# Corner Issue #485
Design AI-native background processing systems with ASP.NET Core. Explore patterns for scalable, reliable AI workloads.
-
Designing a Feature Module Engine for .NET: Architectural Decisions Behind PowerCSharp.Features
Medium Issue #485
How a composite flag resolver, opt-in discovery, and ASP.NET Core conventions combine into a production-grade modular capability system.
-
Building a Vehicle Rental Management System in C# Using Entity Framework Core
C# Corner Issue #484
Build a Vehicle Rental Management System in C# Console App with EF Core, Repository Pattern, Session Management, and Email Integration.
-
SOLID Principles in C# – Part 2: The Open/Closed Principle (OCP)
C# Corner Issue #482
Learn the Open/Closed Principle (OCP) in C#: extend functionality without modifying existing code. Master OCP for robust, scalable software.
-
C# 15 Union Types: A Cleaner Way to Model “One of These” Values
Medium Issue #482
C# 15 is introducing “union types”, for modeling values that can be exactly one of several known types. Now, you do not have to rely on…
-
SOLID Principles in C# – Part 3: The Liskov Substitution Principle (LSP)
C# Corner Issue #482
Master Liskov Substitution Principle (LSP) in C#. Ensure subclasses honor base class contracts for predictable polymorphism.
-
Design Patterns in C# — Real Enterprise Examples That Actually Work in Production
Medium Issue #480
Stop memorising UML diagrams. Start seeing patterns in the code you write every day.
-
C#: What Is the Repository Pattern for Data Access with Entity Framework?
Chris Pietschmann Issue #480
If you spend enough time building C# applications, you eventually run into this question:
-
I Deleted the Repository Pattern From Our Codebase. Here’s What Happened.
Medium Issue #479
Six months later, nobody asked for it back. (And our tests finally catch real bugs.)
-
Event Sourcing in .NET: Real-World Implementation Patterns
C# Corner Issue #478
Explore Event Sourcing in .NET: store business events, not just current state. Learn patterns for audit trails, time travel, and complex workflows.
-
When Your Use Case Half-Succeeds: Designing for Partial Failure in .NET
Milan's .NET Weekly Issue #477
A use case isn't a transaction. The moment it touches more than one system, you are dealing with partial failure. Here's how I classify side effects and design use cases that fail loudly and recover s...