EF Core allows you to instantiate a DbContext in several ways. Learn when and how to use these different approaches in your ASP.NET Core applications.
Learn how you can use value objects in C# to improve the clarity, structure, and maintainability of your code.
Learn how to choose between classes, structs, and record types in C# for power, flexibility, efficiency, and performance.
Take advantage of the new IExceptionHandler interface to handle exceptions gracefully in your ASP.NET Core applications.
Take advantage of the Code First approach in Entity Framework Core to create the data model for your application based on its domain entities in ASP.NET Core.
AutoMapper makes life easy, but has its limits. Learn how to implement a custom mapper to handle complex data structures or incompatible types.
Primary constructors in C# 12 can be used in classes and structs as well as record types. Here’s how they make your code cleaner and more concise.
Understand the differences between the most commonly used interfaces for accessing and manipulating collections of data in C#.
From primary constructors and collection expressions to default lambda parameters, C# 12 has many new features that simplify building modern, flexible applications.
Swagger makes it easy to document APIs, and Swashbuckle makes it easy to use Swagger in ASP.NET Core. Here’s how to implement basic authentication and authorization for your Swagger UI.
It’s easy to secure minimal API endpoints in ASP.NET Core using JSON Web Tokens for authentication and authorization. Just follow these steps.
Take advantage of MethodTimer.Fody to measure the execution speed of your APIs and keep your ASP.NET Core applications running smoothly.
Take advantage of the specification design pattern in C# to improve the modularity, maintainability, and reusability of your source code.
Learn how to use IAsyncEnumerable in C# to easily filter, aggregate, transform, project, or otherwise process continuous streams of data asynchronously.
Take advantage of SoapCore to create SOAP services in ASP.NET Core and support data exchange with other systems.
Structured concurrency offers a more organized and more intuitive way of managing the lifetimes of asynchronous tasks. Here’s how to take advantage of it in C#.
TinyIoC is a lightweight and fast inversion of control container that makes dependency injection simple and easy. Here’s how to take advantage of it in ASP.NET Core applications.
You can take advantage of the decorator design pattern to add in-memory caching to your ASP.NET Core applications. Here’s how.
Take advantage of an API gateway to provide a single point of entry to your back-end services and keep your services secure. YARP makes it easy.
A microservices architecture can help you build applications that are flexible, scalable, and easy to maintain. Here’s how to get started with microservices in ASP.NET Core.
Take advantage of authentication and authorization, API keys, rate limiting, CORS, API versioning, and other recommended practices to build secure and robust APIs in ASP.NET Core.
Take advantage of these 10 strategies to improve data access performance when using Entity Framework Core in your data-driven .NET applications.
When unit tests fail, they should clearly explain why. Take advantage of the Fluent Assertions library to write unit test methods that are simple, readable, concise, and expressive.
Take advantage of these EF Core performance tips to speed up data access in your .NET applications.
Null pointer exceptions are no fun. You can avoid them and keep your code clean and maintainable by using these techniques to elegantly handle null values in C#.
Take advantage of the is and as operators in C# to perform casting operations elegantly and write code that is well structured, concise, and maintainable.
Take advantage of API key authentication to control the access of applications and services to your Web APIs in ASP.NET Core.
Azure Key Vault is a safe and secure place to store the tokens, keys, passwords, certificates, and other sensitive data used in your .NET Core applications. Here’s how to work with it in C#.
Spaghetti is good eating but bad programming. Follow these 10 best practices to keep your C# code clean, lean, and easy to maintain.
Understand the key concepts behind composition and inheritance that allow you to build reusable and flexible types in your .NET applications.
Take advantage of stored procedures, query pagination, query caching, and other advanced Dapper feature to simplify data access and ensure high performance.
Factory-based middleware activation is a more flexible and dynamic approach to configuring and activating middleware components. Here’s how to take advantage of it in ASP.NET Core 7.
Learn how to use the fixed window, sliding window, token bucket, and concurrency algorithms in ASP.NET Core 7 to protect your applications and APIs against malicious attacks or overuse.
Take advantage of response compression middleware in ASP.NET Core to reduce bandwidth requirements and improve the responsiveness of your apps.
Take advantage of the request decompression middleware in ASP.NET Core 7 to enable your API endpoints to accept requests that contain compressed content.
If you don’t repeat yourself, keep it simple, and implement only the functionality you really truly need, your C# code will be cleaner, simpler, and much easier to maintain.
Take advantage of the unit of work design pattern to build flexible, extensible, and reusable data access layers in your ASP.NET Core applications.
Take advantage of the new rate limiting middleware in ASP.NET Core 7 to protect against malicious attacks on your applications and ensure equitable use of server resources.
Take advantage of migrations in EF Core to manage database schema changes over time and keep them in sync with the data models of your ASP.NET Core applications.
Take advantage of SendGrid to integrate reliable and scalable email into your ASP.NET Core applications. Here’s how.
Take advantage of parameter binding in ASP.NET Core 7 to convert request data to strongly typed parameters, improving both application performance and code maintainability.
Orchestration takes a centralized approach, and choreography a decentralized approach, to coordinating the interactions of microservices. Understand the differences.
The latest version of Microsoft’s web application development framework brings excellent new capabilities to middleware, minimal API apps, and more. Here are the highlights.
Take advantage of implicit and explicit operators to convert between user-defined types and improve the readability of your code.
Learn how you can take advantage of delegates like Action, Func, and Predicate to facilitate callbacks and add flexibility to your code.
Take advantage of delegates to promote flexibility and code reuse in your .NET applications and to implement event-driven programming with ease.
Take advantage of the built-in support for OpenAPI in ASP.NET Core to automatically document your HTTP endpoints. Minimal APIs are supported too.
Take advantage of the null object pattern in .NET to eliminate the need for null checks and avoid runtime errors in your applications.
Learn how to protect the information handled by your .NET applications by encrypting and decrypting the data using either a single key or a public/private key pair.
Take advantage of endpoint filters in ASP.NET Core 7 to modify request and response objects, short-circuit the request processing pipeline, or handle cross-cutting concerns for every request.