Take advantage of anti-forgery tokens in ASP.NET Core to protect users of your applications against cross site request forgery exploits.
Why loose coupling between components makes your .NET application more flexible, manageable, scalable, and testable.
Take advantage of string interpolation to incorporate variable substitution in formatted strings in C#.
Take advantage of the extension methods of the IEndpointConventionBuilder interface to implement lightweight services sans template or controller in ASP.NET Core 6.
Take advantage of Azure Storage queues to store large numbers of messages for asynchronous or even distributed processing.
Capture and pass correlation IDs in ASP.NET Core MVC 5 to track HTTP requests that flow through multiple back-end services.
Take advantage of the HTTP logging middleware in ASP.NET Core to log request and response information with flexibility and ease.
Take advantage of filters and request logging middleware in Serilog to reduce log verbosity and generate useful log summaries in your ASP.NET Core MVC applications.
Take advantage of filters to execute custom code at specific points in the request processing pipeline and avoid code duplication across actions.
Take advantage of base controllers to avoid dependency injection code duplication and enforce the DRY principle in ASP.NET Core MVC.
Take advantage of the friendly syntax of Razor View Engine to more easily create views from templates in ASP.NET Core MVC.
Take advantage of aspect-oriented programming using PostSharp to validate method parameters in C#.
Take advantage of closures in C# — including anonymous methods, delegates, and lambda expressions — to make your code robust, efficient, readable, and easier to maintain.
Learn how to use .NET Core and the AWS Toolkit for Visual Studio to build serverless functions and deploy them to AWS Lambda in the Amazon cloud.
Learn how to read request headers and work with optional data that is passed between the server and client in ASP.NET Core 5 applications.
Take advantage of Blazor, Microsoft’s answer to full-stack development, to build rich web apps with C# and .NET Core.
Take advantage of these best practices when working with strings in .NET Core for the optimal performance of your applications.
Take advantage of the SortedDictionary, SortedList, and SortedSet classes in C# to store key-value pairs and sort them based on keys.
Take advantage of lock-free, thread-safe implementations in C# to maximize the throughput of your .NET or .NET Core applications.
Take advantage of these best practices to avoid memory pressure and improve performance when working in .NET or .NET Core applications.
Learn two of the most important features in C# 9.0 to make your code more concise, readable, flexible, and efficient.
Take advantage of the new top-level statements in C# 9.0 to eliminate boilerplate code and make your programs more readable, maintainable, and efficient.
Take advantage of the new relational and logical patterns in C# 9.0 to make your code more readable, maintainable, and efficient.
Take advantage of static anonymous methods in C# 9 to improve the performance of your .NET applications.
Take advantage of LazyCache to improve the performance and scalability of your ASP.NET 5 Core applications in heavy load scenarios.
Take advantage of record types in C# 9 to build immutable types and thread-safe objects.
Take advantage of the DinkToPdf and wkhtmltopdf libraries to generate PDF documents from HTML templates in ASP.NET Core 5.
Take advantage of init-only setters to make configuration options immutable in ASP.NET Core MVC 5 to avoid unnecessary assignments and eliminate opportunities for errors.
Learn how to use constructor injection, property injection, method injection, and the service locator pattern in ASP.NET Core MVC 5, along with their caveats.
Understand the differences between a singleton class and a static class and when to use which in your applications.
Handle unknown actions elegantly in ASP.NET 5 by creating routes that dynamically map to the views in your application.
Overloading action methods that use identical HTTP verbs is tricky in ASP.NET Core 5, but there are a number of ways to do it. Let’s explore them.
Take advantage of the Windows Event Log to store the log data of your .NET Core applications running on Windows
How to register multiple implementations of an interface with the IoC container in ASP.NET Core and retrieve a specific service at runtime.
Take advantage of Microsoft.IO.RecyclableMemoryStream to eliminate LOH allocations and avoid memory fragmentation and memory leaks in your .NET Core applications.
Take advantage of array pooling and memory pooling in C# to reduce allocations and improve the performance of your applications
Take advantage of the Buffer class in .NET to improve application performance through faster access to data in memory
Take advantage of high-performance HashSet collections for storing unique elements to speed up searches in your applications.
Take advantage of IHttpClientFactory to create HttpClient instances seamlessly and avoid having to manage their lifetimes manually
Take advantage of the open source ProblemDetails middleware in ASP.NET Core to send clients standardized, machine-readable error messages when exceptions occur
You can take advantage of custom route constraints in ASP.NET Core to validate route values and avoid passing unwanted or unnecessary requests to action methods.
Take advantage of user secrets management in ASP.NET Core to prevent the sharing of sensitive application data in your projects
Take advantage of named and optional parameters in C# for improved readability, flexibility, and COM interoperability
Take advantage of the lightweight, open source BenchmarkDotNet library to benchmark your methods and track their performance.
Take advantage of fluent interfaces and method chaining to make your code simple, readable, and understandable
Learn how to use gRPC, a language-agnostic, high-performance RPC framework, to build lightweight, high-performance services in ASP.NET Core 3.0
Learn when static methods can’t be unit tested and how to use wrapper classes and the Moq and xUnit frameworks to unit test them when they can
Take advantage of redirect action results in ASP.NET Core MVC to elegantly redirect a request to a specified URL
Follow these best practices to eliminate God objects and design classes that are loosely coupled, cohesive, and easy to maintain
Take advantage of attribute-based routing in ASP.NET Core to decouple the controller and action names from the route template and allow more flexibility in your routing.