Answer the question
In order to leave comments, you need to log in
Why doesn't Automapper work in Asp.net Core 3.0?
I'm trying to connect Automapper to an asp.net core 3.0 project.
To do this, added the package AutoMapper.Extensions.Microsoft.DependencyInjection v7.0.0 (latest)
Add code:
public void ConfigureServices(IServiceCollection services)
{
services.AddAutoMapper();
services.AddControllers();
}
Неоднозначный вызов следующих методов или свойств: 'ServiceCollectionExtensions.AddAutoMapper(IServiceCollection, params Assembly[])" и "ServiceCollectionExtensions.AddAutoMapper(IServiceCollection, params Type[])"
Answer the question
In order to leave comments, you need to log in
Use:
services.AddAutoMapper(typeof(MyProfile1), typeof(MyProfile2));
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question