You might be using an older version of AutoMapper.Extensions.Microsoft.DependencyInjection
Install the latest version of AutoMapper.Extensions.Microsoft.DependencyInjection (I used v7.0.0)from NuGet and change services.AddAutoMapper( ) to services.AddAutoMapper(typeof(services)) in Startup.cs