Blog
Filter
SHOWING 63 OF 63 POSTS
- Jun 21, 2026Modernising Legacy .NET Applications Without a RewriteMost legacy .NET applications don't need a rewrite — they need a plan. Here's how to move a real enterprise codebase from .NET Framework to modern .NET without stopping feature work: async-first data access, structured logging, Polly resilience, health checks, and the strangler fig pattern done right.
- dotnet
- csharp
- architecture
- aspnetcore
- legacy
- refactoring
- production
- Jun 07, 2026Uncle Bob's Agent Pipeline: From Informal Specs to Mutation-Tested .NET CodeUncle Bob described a multi-agent pipeline where human interaction decreases at each stage — Specifier, Coder, Refactorer, Architect — transforming informal requirements into mutation-tested, property-verified code. Here's what each stage does and how to implement it in .NET.
- ai
- dotnet
- csharp
- testing
- agents
- architecture
- tdd
- mutation-testing
- Jun 02, 2026HybridCache in .NET 9: One Caching API, Stampede Protection IncludedIMemoryCache is fast but per-server. IDistributedCache is shared but slow and full of boilerplate. .NET 9's HybridCache combines both into one API — two-tier caching, built-in stampede protection and tag invalidation. Here's how to use it properly.
- dotnet
- csharp
- caching
- redis
- performance
- aspnetcore
- May 25, 2026Uber-like System in .NET: Driver Matching, Surge Pricing and the Complete Request FlowWe've built the location pipeline and the trip state machine. Now we connect them: find the nearest available driver, calculate surge pricing, and trace the full lifecycle from rider request to completed trip.
- dotnet
- csharp
- redis
- efcore
- architecture
- production
- May 17, 2026State Machines in .NET: Modelling Uber's Trip Lifecycle with EF CoreA trip isn't just data — it's a lifecycle. Requested, assigned, en route, completed, cancelled. Get the transitions wrong and two drivers accept the same ride, or a payment fires twice. Here's how to model it correctly in .NET.
- dotnet
- csharp
- efcore
- architecture
- patterns
- production
- May 11, 2026Real-time Driver Location Tracking in .NET: Redis GEO, State Buffer and SignalRUber processes millions of GPS updates every second. Here's how to build the same real-time location tracking pipeline in .NET — from driver updates to rider map — using Redis GEO, a mutable state buffer and SignalR.
- dotnet
- csharp
- redis
- signalr
- architecture
- production
- May 04, 2026CQRS Without MediatR: Hand-Rolled Command and Query Handlers in .NETMediatR went commercial and half the .NET world started looking for an exit. The good news: CQRS was never about MediatR. Here's how to build clean, testable command and query handlers using nothing but the built-in DI container.
- dotnet
- csharp
- architecture
- cqrs
- patterns
- aspnetcore
- Apr 26, 2026Anti-Corruption Layer in .NET: Protecting Your Domain from External APIsEvery external API you consume is a ticking bomb. A model change, a renamed field, a deprecated endpoint — and suddenly your domain logic is full of someone else's concepts. Here's how the Anti-Corruption Layer pattern keeps your domain clean.
- dotnet
- csharp
- ddd
- architecture
- aspnetcore
- patterns
- production
- Apr 22, 2026Kubernetes Probes + .NET: Liveness, Readiness and Startup in ProductionOne /health endpoint is not enough for Kubernetes. Learn how to configure Liveness, Readiness, and Startup probes correctly in .NET — with tagged Health Checks, production YAML, common mistakes, and the reasoning behind every parameter.
- dotnet
- kubernetes
- aspnetcore
- healthchecks
- devops
- production
- csharp
- Apr 12, 2026Health Checks in ASP.NET Core: Beyond the Basic /health EndpointMost developers add a /health endpoint and call it done. Here's how to build health checks that actually tell you what's wrong — database, external APIs, disk space, and Kubernetes probes, all in production-ready code.
- aspnetcore
- dotnet
- csharp
- healthchecks
- kubernetes
- devops
- production
- Apr 05, 2026IAsyncEnumerable<T> in C#: Streaming Data Without Loading Everything into MemoryMaster IAsyncEnumerable to handle large datasets efficiently. Learn production patterns with Entity Framework, HttpClient streaming, and real performance comparisons.
- C#
- .NET
- IAsyncEnumerable
- Performance
- Entity Framework
- Async Streaming
- Mar 28, 2026How I Fixed Supabase Rate Limiting in ProductionDirect Supabase calls from the frontend in The Coffee Timer were triggering 429 errors under load. Here's how moving critical operations to a .NET backend, using Supabase RPCs, server-side caching, and a localStorage TTL fixed it for good.
- supabase
- dotnet
- csharp
- backend
- performance
- architecture
- frontend
- Mar 20, 2026What Your .NET Exceptions Are Telling Attackers (And How to Stop It)Unhandled exceptions in .NET APIs expose stack traces, database schemas, and internal paths to anyone watching. Learn how to implement secure error handling in ASP.NET Core to protect your application without sacrificing observability.
- dotnet
- csharp
- security
- aspnetcore
- error-handling
- best-practices
- api
- Mar 15, 2026GitHub Actions for .NET: Build, Test, and Deploy Your APILearn how to set up a complete CI/CD pipeline for your .NET applications using GitHub Actions — from building and testing on every push to deploying Docker containers to Azure
- dotnet
- csharp
- devops
- github-actions
- cicd
- docker
- azure
- testing
- Mar 07, 2026Messaging in .NET: Queues, Topics, and Why You Need ThemLearn why asynchronous messaging matters in .NET applications, how queues and topics differ, and when to use RabbitMQ, Azure Service Bus, or AWS SQS to build reliable, decoupled systems
- dotnet
- csharp
- messaging
- architecture
- rabbitmq
- scalability
- best-practices
- Feb 22, 2026Getting Started with PostgreSQL in .NET: From Zero to ProductionLearn how to connect PostgreSQL to your .NET application using Entity Framework Core and Dapper, set up Docker locally, run migrations, and leverage PostgreSQL-specific features like JSONB, arrays, and enum types
- dotnet
- csharp
- database
- postgresql
- efcore
- dapper
- sql
- Feb 13, 2026Vertical Slice Architecture in .NETLearn how Vertical Slice Architecture organizes code by features instead of layers, reducing coupling and accelerating development in .NET applications
- csharp
- dotnet
- architecture
- design-patterns
- mediatr
- best-practices
- Feb 04, 2026Bulk Operations in EF Core 10: Beyond SaveChanges()ExecuteUpdate and ExecuteDelete provide 300-500x performance improvements for bulk operations, eliminating the need to load thousands of entities into memory
- csharp
- dotnet
- efcore
- performance
- sql
- optimization
- Jan 25, 2026LeftJoin and RightJoin in EF Core 10EF Core 10 finally introduces native LeftJoin and RightJoin LINQ operators, replacing the verbose GroupJoin + DefaultIfEmpty pattern with clean, readable code
- csharp
- dotnet
- efcore
- linq
- sql
- Jan 18, 2026Result Pattern in C#Learn how to implement the Result Pattern for cleaner error handling without exceptions. Discover when to use it, how to build it from scratch, and integrate it with ASP.NET Core Minimal APIs.
- csharp
- dotnet
- patterns
- error-handling
- functional-programming
- clean-code
- aspnetcore
- Jan 12, 2026Minimal API Validation in .NET 10Discover the new built-in validation support for Minimal APIs in .NET 10. Learn how to use DataAnnotations, custom validation attributes, and IValidatableObject without external packages.
- csharp
- dotnet
- dotnet10
- aspnetcore
- minimalapi
- validation
- dataannotations
- webapi
- Jan 04, 2026Channels in C#Learn how to build high-performance, thread-safe producer-consumer applications using System.Threading.Channels. Explore bounded and unbounded channels, backpressure strategies, and real-world implementation patterns.
- csharp
- dotnet
- concurrency
- async
- channels
- producer-consumer
- threading
- performance
- Dec 22, 2025Building AI-Ready Applications with Model Context Protocol in C#Learn how to build MCP servers and clients in C# using the official SDK, and connect your .NET applications with AI models in a standard, scalable way.
- C#
- .NET
- MCP
- Model Context Protocol
- AI
- LLM
- Anthropic
- Microsoft
- SDK
- Visual Studio Code
- GitHub Copilot
- Dec 17, 2025The New Field Keyword Improves Properties in C# 14Discover how the new field keyword in C# 14 eliminates boilerplate code and provides an elegant middle ground between auto-properties and full properties. Learn practical use cases including validation, lazy initialisation, and INotifyPropertyChanged.
- C#
- .NET
- .NET 10
- C# 14
- Properties
- Field Keyword
- Auto-Properties
- MVVM
- INotifyPropertyChanged
- Best Practices
- Dec 07, 2025Adapter Pattern Explained with Real ExamplesLearn the Adapter Pattern through practical .NET examples: payment gateways, logging systems, and legacy code integration. Understand when and how to use this essential structural design pattern.
- C#
- .NET
- Design Patterns
- Adapter Pattern
- SOLID
- Architecture
- Refactoring
- Best Practices
- Gang of Four
- Structural Patterns
- Nov 29, 2025Repository Pattern vs Direct EF Core: The Great DebateShould you use the Repository Pattern or work directly with DbContext? Explore both approaches with practical examples, performance benchmarks, and real-world scenarios to make the right choice for your .NET projects.
- C#
- .NET
- Entity Framework Core
- Repository Pattern
- DbContext
- Design Patterns
- Architecture
- Performance
- Testing
- Best Practices
- ASP.NET Core
- Database
- CRUD
- Domain-Driven Design
- Nov 15, 2025Task vs ValueTask in C#A clear and practical guide to understanding Task vs ValueTask in .NET, with benchmarks, examples, rules of thumb, and real-world recommendations.
- dotnet
- csharp
- async
- performance
- valuetask
- Oct 27, 202515 Essential C# Shorthand Operators Every Developer Should Know in 2025Master the most powerful shorthand operators in modern C# that will transform your code. From fundamentals to C# 13 features, learn how to write cleaner, more efficient code that stands out.
- C#
- .NET
- Programming
- Clean Code
- C# 13
- Operators
- Modern C#
- Best Practices
- Developer Tips
- .NET 9
- Code Quality
- Oct 18, 2025Build Your Local AI with C# and .NETLearn to run artificial intelligence models completely offline with C# and .NET using llama.cpp and LLamaSharp. Control your data, avoid API costs, and build your own local assistant step by step.
- C#
- .NET
- AI
- Offline
- llama.cpp
- LLamaSharp
- Mistral
- Llama 3
- AI Models
- ASP.NET Core
- Privacy
- Self-Hosted AI
- Open Source
- Oct 06, 20257 Types of Constructors in C#Comprehensive guide to constructors in C#. Learn the 7 essential constructor types: default, parameterised, copy, static, private, chaining, and optional parameters. Includes practical examples, use cases, and best practices for object initialisation in C#.
- C#
- .NET
- Constructors
- Object-Oriented Programming
- OOP
- Design Patterns
- Singleton
- Best Practices
- Clean Code
- Software Development
- Sep 29, 2025AutoMapper: Mastering Complex Mappings in C#Complete guide to AutoMapper in C#. Learn advanced mapping techniques: nested mappings, custom resolvers, value converters, projection with Entity Framework, testing strategies, performance optimisation, and common pitfalls. Includes practical examples and best practices.
- C#
- .NET
- AutoMapper
- Object Mapping
- Entity Framework
- Performance
- Testing
- Best Practices
- Design Patterns
- Clean Code
- Sep 21, 2025Types of Unit Tests in C# – Master Testing Like a ProComplete guide to unit testing in C#. Learn all types of tests: basic unit tests, mocks, parametrised tests, async testing, property-based testing, and best practices. Includes practical examples with xUnit, NUnit, Moq, and advanced techniques.
- C#
- .NET
- Unit Testing
- TDD
- xUnit
- NUnit
- Moq
- Testing
- Software Quality
- Best Practices
- Aug 24, 2025Rate Limiting in ASP.NET Core – Protect Your APIs Like a ProLearn how to implement rate limiting in ASP.NET Core to protect your APIs from abuse, DDoS attacks, and excessive usage. Includes native .NET 7+ features, custom implementations, Redis distributed scenarios, and benchmarks.
- .NET
- ASP.NET Core
- Rate Limiting
- Security
- Performance
- C#
- Redis
- API Protection
- Aug 18, 2025Database Indexing in .NET with EF Core – Boost Your Query PerformanceLearn how to improve query performance in your .NET applications using database indexing with Entity Framework Core. Includes examples with Fluent API, Data Annotations, migrations, and a benchmark.
- .NET
- EF Core
- Database
- Indexing
- Performance
- C#
- SQLite
- Aug 04, 2025Semantic Search with .NET Core and AI: Build Your Smart API from ScratchLearn how to build a smart API with .NET Core, SQLite, and OpenAI to perform semantic search using embeddings. A practical guide for beginners who want to integrate AI into real-world applications.
- .NET
- .NET Core
- Semantic Search
- AI
- OpenAI
- Embeddings
- SQLite
- C#
- Beginner
- Jul 27, 2025Applying the Mediator Pattern in ASP.NET Core with MediatRDecouple your ASP.NET Core applications using the Mediator pattern and MediatR. This guide shows how to structure your code for maintainability, testability, and clean architecture with real-world examples and pipeline behaviours.
- .NET
- ASP.NET Core
- MediatR
- Design Patterns
- Clean Architecture
- Dependency Injection
- C#
- Jul 21, 2025SQL Server as a Configuration Provider in .NET CoreLearn how to use a SQL Server database as a configuration source in ASP.NET Core. This guide covers custom providers, dynamic reload support, and best practices for secure, scalable config management.
- .NET
- Configuration
- ASP.NET Core
- SQL Server
- Architecture
- Dependency Injection
- IConfiguration
- Jul 12, 2025Detecting Missing Migrations in EF Core: A Guide for .NET DevelopersAvoid database drift and deployment surprises by learning how to detect and prevent missing migrations in Entity Framework Core. Includes automated checks, runtime guards, and CI-friendly scripts.
- .NET
- Entity Framework Core
- Migrations
- Database
- Architecture
- Clean Code
- DevOps
- Jun 28, 2025DDD in .NET: Modelling Rich and Meaningful DomainsLearn how to apply Domain-Driven Design in .NET to create expressive, maintainable, and business-focused domain models. Includes practical examples with Value Objects, Aggregates, Repositories, and tests.
- .NET
- DDD
- Architecture
- Software Design
- Clean Code
- Domain-Driven Design
- Jun 21, 2025How to Measure and Improve Performance in .NETA practical guide to diagnosing and optimising .NET applications in real-world environments. Learn what to measure, which tools to use, and the best practices for making .NET applications faster, more predictable, and more resilient.
- .NET
- Performance
- Optimization
- Diagnostics
- C#
- Jun 14, 2025How to Store Secrets Securely in .NET: Environment Variables, AppSettings, User Secrets and MoreLearn the best practices to handle secrets in .NET applications using environment variables, user secrets, configuration files, and Azure Key Vault. Keep your credentials safe and your architecture clean.
- .NET
- Security
- Configuration
- DevOps
- C#
- Azure
- Jun 08, 2025Core-Driven Architecture: Structuring Business Logic for Maintainable and Scalable .NET ApplicationsExplore Core-Driven Architecture to keep your business domain isolated and clean. Learn how to build maintainable, scalable, and testable .NET applications by focusing on core business logic and clear separation of concerns.
- .NET
- Architecture
- Clean Code
- Design Patterns
- Domain-Driven Design
- C#
- Jun 04, 2025Avoiding Indexed Access in .NET: Safer and Faster Alternatives for Production CodeAccessing elements by index is fast but risky in production .NET code. Learn safer and more expressive alternatives to avoid runtime exceptions, fragile logic, and unclear intent. Includes benchmarks, real-world examples, and a diagram.
- .NET
- Performance
- Best Practices
- Code Quality
- C#
- BenchmarkDotNet
- Jun 01, 2025MVVM in .NETMVVM is a powerful architectural pattern used in .NET desktop applications like WPF, MAUI, and WinUI. In this article, we break down the pattern with a practical example, a diagram, its pros and cons, and step-by-step instructions to build it in Visual Studio Code.
- .NET
- MVVM
- WPF
- Architecture
- CommunityToolkit
- May 25, 2025Store Encrypted Data in Your Database Using .NET – Secure and EfficientProtecting sensitive data is a critical requirement in any modern application. Whether it’s personal information, passwords, or API keys, we must ensure that stored data isn’t left in plain text in case of a breach.
- .NET
- Security
- Encryption
- EF Core
- Best Practices
- SQLite
- May 22, 2025Understanding the Cost of Abstractions in .NETAbstractions make our code elegant and modular — but they're not free. In this article, we explore how some common abstractions in .NET can hurt performance if used carelessly, and how to avoid the hidden costs.
- .NET
- Performance
- Abstractions
- Optimisation
- May 17, 2025Optimising ASP.NET Core APIs for Speed and Efficiency. Practical techniques to reduce latency, CPU usage, and memory allocationsBuilding a working API is one thing — building a *fast and efficient* API is another. As your application scales or handles more users, performance becomes a critical concern.
- .NET
- Performance
- Memory
- API
- May 14, 2025Reducing Garbage Collector (GC) Pressure in .NET: Practical Patterns and ToolsLearn how to reduce GC pressure in your .NET applications using structs, ArrayPool<T>, and smart memory patterns.
- .NET
- Performance
- GC
- Memory
- Arraypool
- May 11, 2025How to Read a File in C#: Quick and Efficient MethodsReading files is a fundamental skill in C#, and knowing the right method can improve both performance and readability. This article explores various ways to read text files, from the simplest to the most efficient, with practical code examples and guidance.
- ASP.NET Core
- .NET
- C#
- May 09, 2025Background Tasks in C# 🧵In modern applications, especially web and desktop apps, executing long-running tasks on the main thread can block user interactions or degrade performance. That’s where background tasks come in.
- ASP.NET Core
- Background Tasks
- Queue
- IHostedService
- Channel
- .NET
- Concurrency
- Scalability
- May 07, 2025How to Add Multiple Languages to Your ASP.NET Core Application (Step-by-Step Localization Guide)Learn how to add localization support to your ASP.NET Core application, enabling multiple languages and culture-specific features.
- ASP.NET Core
- Localization
- Multi-language
- Globalization
- .NET
- Apr 27, 2025Create an API in .NET with MongoDB and PaginationLearn how to build a RESTful API using .NET and MongoDB, with a focus on implementing pagination to efficiently manage large datasets.
- .NET
- MongoDB
- Pagination
- Apr 25, 2025What’s New in C# 14: More Power, Less CodeThe .NET ecosystem keeps evolving, and with the release of C# 14 alongside .NET 10, developers now have a fresh set of features that make the language even more expressive, concise, and powerful. In this post, I’ll walk you through the key improvements in this new version, with clear and practical examples.
- .NET
- C#
- Apr 19, 2025How to Secure Your .NET ApplicationsSecurity is one of the most critical aspects of modern application development. In an era where data breaches and cyber threats are increasingly common, securing your .NET applications is not optional – it’s essential. This guide covers practical strategies and tools you can apply right now to make your applications safer and more resilient.
- Security
- .NET
- .NET Core
- Authentication
- Authorization
- Apr 15, 2025Multithreading in C#Multithreading in C# might sound intimidating at first, but once you get the hang of it, it becomes a superpower for writing responsive, efficient, and modern applications. Whether you're building a UI that shouldn't freeze or handling heavy background work in a backend service, multithreading can help.
- .NET
- C#
- .NET Core
- Multithreading
- Mar 27, 2025Optimising Database Performance Using DapperDapper is a lightweight micro-ORM for .NET that offers high-speed data access while keeping things simple. Unlike full-fledged ORMs like Entity Framework, Dapper focuses on raw SQL execution with minimal overhead. If you're working on an application where performance matters, Dapper can be a great choice.
- .NET
- C#
- .NET Core
- SQL
- Dapper
- Database
- Mar 22, 2025CancellationToken in .NET: What Are They and Why Should You Use Them?If you work with .NET and asynchronous tasks, you've probably encountered the need to cancel an ongoing operation. This is where Cancellation Tokens (CancellationToken) come into play, a crucial tool for improving performance and responsiveness in your applications. When dealing with long-running tasks like database queries, HTTP requests, or CPU-intensive processes, it’s important to be able to stop them if they’re no longer necessary. This prevents wasting resources and makes your application more efficient.
- .NET
- C#
- .NET Core
- Jan 20, 20259 Ways to Set the URLs for an ASP.NET Core AppIn this article, we’ll explore 9 ways to set the URLs for your ASP.NET Core app, with practical examples to help you decide which method suits your needs.
- .NET
- C#
- .NET Core
- Jan 11, 2025Top 12 Best PracticesTop 12 Best Practices for REST APIs using C# .NETDesigning a good RESTful API remains a crucial part of modern application development. With the rise of mobile applications, distributed architectures, and microservices, creating APIs that are easy to use, efficient, and secure is more important than ever. This article will explore 12 best practices for building REST APIs, focusing on C# .NET.
- C#
- .NET
- Rest Api
- Nov 02, 2024Uploading Images in Next.js (File Uploads, Filestack)Uploading images in Next.js is a common task when developing web applications.
- Next.js
- Filestack
- Javascript
- May 03, 2024Rest API in C#In C#, there are two main options for creating APIs: SOAP (Simple Object Access Protocol) and REST (Representational State Transfer).
- C#
- .NET
- Rest Api
- SOAP
- Feb 04, 2024Installing Docker in .NET 8 and React ProjectsInstallation and configuration of docker for Dotnet 8 and React, I have also added some commands that will help us.
- C#
- .NET
- React
- Docker
- Jan 24, 2024Asynchrony in Programming with Async/AwaitAsynchrony is an essential tool in modern programming, designed to enhance the efficiency and responsiveness of applications.
- C#
- .NET