Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ASP.Net WebApplication.CreateBuilder(args) #8

Closed
JoFo-IT opened this issue Mar 19, 2023 · 1 comment
Closed

ASP.Net WebApplication.CreateBuilder(args) #8

JoFo-IT opened this issue Mar 19, 2023 · 1 comment

Comments

@JoFo-IT
Copy link

JoFo-IT commented Mar 19, 2023

Is there a way to use RegisterAutoMapper with WebApplicationBuilder?

@alsami
Copy link
Owner

alsami commented Mar 21, 2023

Yes, of course.

void ConfigureContainer(ContainerBuilder containerBuilder)
{
    containerBuilder.RegisterAutoMapper(...);
}

builder.Host.UseServiceProviderFactory(new AutofacServiceProviderFactory(ConfigureContainer));

I will make myself a ticket to add a sample for the new way of creating a host.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants