The astrivo blog
Practical, hands-on writing about .NET 10, C#, AI integration, AWS, event-driven architecture, and Azure — the same things we work on with clients, written up in full.
Latest post · .NET
NoSQL in .NET: Choosing Between DynamoDB, Cosmos DB, and MongoDB
DynamoDB, Cosmos DB, and MongoDB each make a different bet about how you'll query and scale. Here's how we choose, and how to model data for each from .NET.
In this post
Partition key designThe decision that's hard to reverse
Consistency defaultsDynamoDB vs Cosmos DB vs MongoDB
When to say noRelational still wins sometimes
Event-Driven12 min read
The Saga Pattern: Managing Distributed Transactions Without 2PC
Two-phase commit doesn't survive contact with microservices. Here's how we manage transactions that span services with sagas instead -- choreography, orchestration, and compensation done properly.
.NET11 min read
CQRS in .NET: When Command/Query Separation Actually Pays Off
CQRS gets conflated with event sourcing constantly. It doesn't require it -- here's the lightweight version most teams should start with, and the honest signal it's time for more.
.NET10 min read
CAP Theorem and Consistency Models: A Practical Guide for .NET Engineers
CAP theorem is a statement about network partitions, not a permanent trade-off. Here's what it actually means for the consistency decisions you make in DynamoDB, Cosmos DB, and SQL every day.
C#10 min read
C# 14: The New Features Worth Adopting
C# 14 shipped with .NET 10, and a couple of its features change how you'd design an API from scratch. Here's what's worth adopting, and why.
.NET11 min read
Native AOT in .NET 10: When It's Worth It
Faster startup, less memory, smaller binaries — and a real list of trade-offs. Here's how we decide when Native AOT is the right call in .NET 10.
.NET10 min read
LINQ Performance Gotchas Every .NET Engineer Should Know
LINQ is one of the best things about C#, and it's also where a lot of quietly expensive code hides. The handful of mistakes we flag most often in review.
.NET12 min read
Debugging .NET Production Issues: dotnet-trace, dotnet-counters, and dotnet-dump
No code changes, no redeploy, no restart. Here's how we use dotnet-trace, dotnet-counters, and dotnet-dump to diagnose issues on a live process.
.NET11 min read
Writing Unit Tests That Actually Catch Bugs in .NET
A large test suite isn't the same thing as a good one. What actually makes a .NET test suite worth trusting.
AI13 min read
Adding AI Features to .NET Apps with Microsoft.Extensions.AI and Azure OpenAI
Chat completions, embeddings, and retrieval-augmented generation are becoming standard parts of the .NET stack. Here's the current, vendor-neutral way to wire them in.
AI11 min read
Using AI to Accelerate Legacy .NET Modernization
AI tooling doesn't replace a modernization plan, but it meaningfully speeds up the grinding parts -- code comprehension, dependency analysis, and mechanical refactoring. Here's where it actually helps.
.NET12 min read
gRPC and Minimal APIs in .NET 10: Picking the Right Interface
Minimal APIs and gRPC solve different problems well -- REST/JSON for broad compatibility, gRPC for fast internal service-to-service calls. Here's how we decide, and how to run both from the same host.
.NET11 min read
Distributed Tracing in .NET with OpenTelemetry
Structured logs and metrics tell you something's wrong. Distributed traces tell you where, across every service a request touched. Here's how we wire up OpenTelemetry in .NET 10 services.
.NET9 min read
API Versioning in ASP.NET Core: Strategies and Trade-offs
URL segments, headers, or query strings -- every versioning strategy has a cost. Here's how we pick one and implement it with Asp.Versioning in ASP.NET Core.
.NET10 min read
Feature Flags in .NET with Microsoft.FeatureManagement
Ship code dark, roll out gradually, and kill a bad feature without a redeploy. Feature flags done the boring, reliable way in .NET.
Azure12 min read
Message-Based Communication with Azure Service Bus and MassTransit
MassTransit gives you a consistent abstraction over Azure Service Bus so your message contracts and consumers don't have to change when the transport does.
.NET12 min read
Adding Single Sign-On to ASP.NET Core Web Apps with OIDC
Cookie authentication plus an OpenID Connect challenge -- how we wire up SSO for server-rendered ASP.NET Core web apps against Entra ID, Okta, or any standards-compliant IdP.
.NET11 min read
Role-Based and Policy-Based Authorization in ASP.NET Core
Roles get you far, but claims-based policies are what make authorization actually maintainable as your app grows. Here's how we structure both in ASP.NET Core.
.NET11 min read
Building Reliable Background Services in .NET
IHostedService and BackgroundService cover more ground than people think -- queued work, scheduled jobs, and long-running processors, all without a separate scheduler.
.NET11 min read
Resilient HTTP Calls and Health Checks in .NET
Retries, circuit breakers, and timeouts for outbound HTTP calls using Microsoft.Extensions.Http.Resilience, plus wiring health checks so orchestrators know when to stop sending traffic.
.NET10 min read
Distributed Caching in .NET with HybridCache and Redis
HybridCache combines a fast in-process cache with a shared Redis layer behind one API -- and solves cache stampedes for you. Here's how we use it.
.NET11 min read
Integration Testing ASP.NET Core APIs with WebApplicationFactory
Unit tests prove your handlers work in isolation. Integration tests prove the whole pipeline -- routing, DI, middleware, and a real database -- actually works together.
.NET10 min read
Structured Logging in .NET with Serilog
Plain text logs don't scale past a handful of requests a day. Here's how we set up Serilog for structured, queryable logging in .NET 10 services.
.NET11 min read
Securing Swagger and OpenAPI with OIDC in ASP.NET Core
ASP.NET Core dropped Swashbuckle from the default template -- here's how to wire up OpenAPI docs, Swagger UI, and OIDC-protected endpoints the current way.
.NET12 min read
EF Core vs Dapper in .NET 10: Choosing Your Data Access Strategy
Choosing between EF Core and Dapper for your .NET 10 data layer -- and how we mix both in the same codebase without regret.
.NET12 min read
Migrating Legacy .NET Framework Apps to .NET 10: A Practical Roadmap
A phased, low-risk approach to moving production .NET Framework applications onto .NET 10 -- without stopping feature work or betting the business on a rewrite.
Event-Driven11 min read
Event-Driven Architecture: Core Patterns and When to Use Them
Choreography vs orchestration, event notification vs event-carried state transfer, and how to pick the right pattern for your system.
AWS13 min read
Building Production-Grade AWS Lambda Functions with .NET
Project structure, dependency injection, error handling, and observability for .NET Lambda functions that survive contact with production.
Azure10 min read
Azure Functions vs AWS Lambda: A Practical Comparison for .NET Teams
Triggers, cold starts, pricing, and developer experience compared side by side for teams choosing a serverless platform.
C#14 min read
12 Modern C# Features That Will Make You a Better Engineer
From pattern matching to primary constructors and collection expressions -- the C# features worth adopting today.
Event-Driven12 min read
Designing Reliable Event Pipelines with SNS, SQS, and EventBridge
Fan-out, dead-letter queues, idempotency, and ordering guarantees when you wire AWS messaging services together.
.NET13 min read
Clean Architecture in .NET 10: A Practical Guide
How we structure .NET 10 solutions so business logic stays testable and infrastructure stays swappable.
AWS9 min read
Taming AWS Lambda Cold Starts in .NET Workloads
Provisioned concurrency, SnapStart, and native AOT -- practical ways to cut .NET Lambda cold start latency.
C#11 min read
Async/Await in C#: Patterns, Pitfalls, and Performance
ConfigureAwait, deadlocks, cancellation tokens, and the mistakes that quietly slow down async C# code.
Azure10 min read
Deploying .NET 10 Applications to Azure Container Apps
Containerizing a .NET 10 API and shipping it to Azure Container Apps with autoscaling, secrets, and revisions done right.