You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
var builder = WebApplication.CreateBuilder(args);
// Call UseServiceProviderFactory on the Host sub property
builder.Host.UseServiceProviderFactory(new AutofacServiceProviderFactory());
// Call ConfigureContainer on the Host sub property
builder.Host.ConfigureContainer<ContainerBuilder>(builder =>
{
builder.RegisterModule(new MyApplicationModule());
});
var app = builder.Build();
app.MapGet("/", () => "Hello World!");
app.Run();
Is there a simmilar example for castle? i cant find a castle service provider factory for example.
Previously i was using the Castle.Windsor.MsDependencyInjection WindsorRegistrationHelper.CreateServiceProvider(container, services);
The text was updated successfully, but these errors were encountered:
Are there any examples of how to use Castle Windsor with the new .net 6 Core minimal style
This site has a autofac example
https://andrewlock.net/exploring-dotnet-6-part-10-new-dependency-injection-features-in-dotnet-6/
Is there a simmilar example for castle? i cant find a castle service provider factory for example.
Previously i was using the Castle.Windsor.MsDependencyInjection
WindsorRegistrationHelper.CreateServiceProvider(container, services);
The text was updated successfully, but these errors were encountered: