First off, let’s create an ASP.NET Core 7 project in Visual Studio 2022. Follow these steps: We’ll use this ASP.NET Core 7 Web API project to work with advanced features of Dapper in the sections ...
When you need to integrate authorization with procedural code, you're going to need your application's ClaimsPrincipal object so that you can check the user's authorization claims. Here's both how to ...
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. Immutability makes code ...
[Editor's note: Peter rewrote this article after a reader pointed out he over-engineered his original solution. ("What can I say: The code worked -- I just didn't need nearly as much code as I thought ...