(https://i.stack.imgur.com/J4v7h.png) I have installed both AutoMapper and AutoMapper.Extensions.Microsoft.DependencyInjection
But still I am getting the same error
CodePudding user response:
I didn't add the builder.services line in program.cs file that is
builder.Services.AddAutoMapper(AppDomain.CurrentDomain.GetAssemblies());
CodePudding user response:
Have you added it in Program.cs like
builder.Services.AddAutoMapper(config =>
{
config.AddProfile(typeof(YourMappingProfile));
});