Microsoft recommendation is to place service registration extension methods within the Microsoft.Extensions.DependencyInjection namespace. However, ServiceCollectionExtensions is in the AutoMapper namespace so, the .AddAutoMapper extension method isn't available in Startup.cs until you add using AutoMapper;.
We might consider changing the namespace to the MS recommended one so that the 'using' isn't necessary.
Microsoft recommendation is to place service registration extension methods within the
Microsoft.Extensions.DependencyInjection
namespace. However,ServiceCollectionExtensions
is in theAutoMapper
namespace so, the.AddAutoMapper
extension method isn't available in Startup.cs until you addusing AutoMapper;
.We might consider changing the namespace to the MS recommended one so that the 'using' isn't necessary.