Установите Automapper ASP.NET CORE MVC

Install-Package AutoMapper.Extensions.Microsoft.DependencyInjection -Version 7.0.0
Horrible Hare