Take advantage of ref structs to reduce resource consumpiton and eliminate garbage collection overhead. C# 13 gives us more ways to use them.
Take advantage of the DispatchProxy class in C# to implement aspect-oriented programming by creating proxies that dynamically intercept method calls.
Aspect-oriented programming allows you to isolate the cross-cutting concerns of your application, reduce code duplication, and improve the readability and maintainability of your code.
Take advantage of the new Task.WhenEach method to process asynchronous tasks as they complete, enhancing the efficiency of your .NET applications.
A good knowledge of exception handling is needed to build applications that are capable of handling runtime errors efficiently. Start with these simple guidelines.
Take advantage of the Result pattern, the Try-Parse pattern, and other techniques to make error handling more explicit and to avoid writing exception handling code in your .NET applications.
Take advantage of the FluentValidation open-source library to validate data in your ASP.NET Core application and keep your code clean, organized, and maintainable.
C# 13 introduces several new features that make it easier to build modern applications including enhanced params collections and a new Lock API that improves thread synchronization.
HybridCache is a new API in .NET 9 that brings additional features, benefits, and ease to caching in ASP.NET Core. Here’s how to take advantage of it.
Understanding the differences between an abstract class and interface is key to designing loosely coupled and extensible applications.
Learn the best practices and built-in safeguards for preventing attacks and protecting sensitive data in your ASP.NET Core web applications.
Take advantage of improved identity management in ASP.NET Core to implement identity-based authentication for minimal APIs quickly, easily, and with less code.
Lightweight and fast SQLite shines as a development companion. Learn how to take advantage of it in ASP.NET Core.
How to implement basic password authentication for a minimal API in ASP.NET Core using a custom authentication handler that validates the user’s credentials against a database.
Parameter binding from forms, antiforgery tokens, and Native AOT are now supported in ASP.NET Core. Here’s how to take advantage of them.
Take advantage of connection resiliency in EF Core to detect errors and retry commands and enable your ASP.NET Core application to overcome transient faults.
The new SearchValues class takes advantage of vectorization and hardware acceleration to speed up repeated searches in .NET 8.
Understand the pitfalls of using enumeration types in the domain layer of your .NET applications and the advantages of using record types instead.
Embrace the request-endpoint-response design pattern to simplify API development and make your code cleaner, more efficient, and easier to maintain.
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.