How to Use AutoMapper With .NET Core 3.1 Web API
Start by installing the AutoMapper extension from the package manager in your project. In PowerShell, or with the package manager console in Visual Studio, type: Register a service in ConfigureServices in the startup.cs file: Add an AutoMapping.cs file with the following content: Inject a mapper into your controller: Now you can do the mapping like... » read more