Transient vs Scoped vs Singleton in .NET - When to Use Each
Transient, Scoped, or Singleton? Learn how each .NET service lifetime behaves, when to use it, and how to avoid the captive-dependency bug that breaks production.
Showing 85-96 of 144 articles
Transient, Scoped, or Singleton? Learn how each .NET service lifetime behaves, when to use it, and how to avoid the captive-dependency bug that breaks production.
How dependency injection really works in ASP.NET Core - service lifetimes, interface-driven design, factory delegates, and the common DI mistakes that break apps.
DynamoDB Streams offer a powerful way to capture real-time changes in your DynamoDB tables, enabling event-driven architectures, auditing, replication, and more. In this guide, I will walk you through everything .NET developers need to know to get started with DynamoDB Streams. By the end of this guide, you’ll have a solid foundation for integrating DynamoDB Streams into your .NET applications, unlocking real-time data processing capabilities to enhance your architecture.
Modern distributed systems rely on messaging services like Amazon SQS and SNS. They help you decouple these interconnected components, ensuring each part works independently yet harmoniously. Whether it’s queuing tasks for reliable processing with SQS or broadcasting real-time notifications to multiple subscribers with SNS, these tools play a pivotal role in simplifying complex workflows.
Learn how to implement Amazon DynamoDB Time to Live (TTL) for efficient data expiration in .NET applications. This guide explains the basics of TTL, showing you how to automatically remove outdated items and optimize database operations. Perfect for developers, this guide ensures you can effectively manage data life cycles with DynamoDB's powerful TTL feature.
Batch operations in Amazon DynamoDB allow developers to efficiently perform multiple read, write, update, and delete actions in a single request, optimizing performance and reducing costs. In this article, we'll explore how to implement batch operations using DynamoDBContext in the AWS .NET SDK. By building a simple .NET web API, you'll gain hands-on experience working with DynamoDB batch operations in a practical context.
This Guide on Amazon RDS for .NET Developers covers everything you need to know to integrate RDS into your .NET applications seamlessly. From choosing the right database engine (like PostgreSQL) to setting up instances, implementing EF Core for CRUD operations, and scaling with read replicas, this guide equips you with the knowledge and skills to build robust, scalable solutions.
Serverless applications have become a key component of modern software solutions. In many of the .NET projects I've worked on, AWS Lambda plays a pivotal role in the overall system architecture. With Terraform being one of the most widely used Infrastructure as Code (IaC) tools, mastering how to efficiently deploy .NET Lambda functions to AWS is an essential skill for any developer.
Let’s automate the deployment of a brand-new .NET 9 Web API to Amazon ECS using a GitHub Actions CI/CD pipeline. In this guide, we’ll walk through building a .NET 9 Docker image directly on GitHub, pushing it to Amazon Elastic Container Registry (ECR), creating an ECS task definition, and configuring an ECS service to fetch and deploy the latest Docker image. By the end, your application will be up and running on ECS with a fully automated workflow.
This comprehensive guide, Choosing the Best AWS Compute Service for your .NET Solution, will explore everything you need to know about selecting the right AWS compute option for your .NET applications. From EC2 to Lambda, we'll compare cost, operational overhead, ease of deployment, and more, providing you with the insights needed to make an informed decision. Whether you're new to AWS or looking to deepen your cloud expertise, this guide will equip you with the knowledge and tools necessary to choose the most suitable compute service for your specific .NET project requirements.
Terraform is a powerful tool for automating infrastructure deployment and management across multiple cloud providers. Whether you are new to infrastructure as code or looking to deepen your Terraform expertise, this guide will provide you with the knowledge and skills necessary to effectively manage infrastructure in your projects, regardless of the technology stack you work with.
In this article, we are going to implement Response Caching with MediatR in ASP.NET Core using its awesome Pipeline Behaviours. I have written a couple of articles about MediatR and why it's one of the MUST USE libraries for .NET Developers.