Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

asp.net core 6 autofac

var builder = WebApplication.CreateBuilder(args);

// The UseServiceProviderFactory call attaches the
// Autofac provider to the generic hosting mechanism.

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

// Add services to the container.
builder.Services.AddControllersWithViews();

//Register your own things directly with Autofac here
builder.Host.ConfigureContainer<ContainerBuilder>(builder => builder.RegisterType<Service>().As<IService>());

var app = builder.Build();
Comment

PREVIOUS NEXT
Code Example
Csharp :: convert uint to int C# 
Csharp :: unity gameobject find inactive 
Csharp :: c# read double 
Csharp :: mvc string format 
Csharp :: c# system.text.json deserialize 
Csharp :: parametrizedthreadstart C# 
Csharp :: c# modify dictionary in loop 
Csharp :: linq foreach c# 
Csharp :: c# get assembly directory 
Csharp :: element click intercepted exception in selenium C# 
Csharp :: c# arrow 
Csharp :: c# linq to select even numbers 
Csharp :: c# remove everything after last slash 
Csharp :: new datetime c# 
Csharp :: c# entity framework get all records from table 
Csharp :: c# how to append in array 
Csharp :: delay activity in uipath 
Csharp :: unity get max occurrence in list 
Csharp :: iframe set html content c# 
Csharp :: dxf read c# 
Csharp :: loop for specific time c# 
Csharp :: csharp bubble sort 
Csharp :: How to make a simple console select screen using C# ReadKey 
Csharp :: sharepoint c# get list item query by lookup 
Csharp :: monegame deltatime 
Csharp :: xamarin set environment variables 
Csharp :: C# top down view player movement 
Csharp :: c# selenium xunit testing 
Csharp :: change skybox color unity 
Csharp :: how to call an If statement only once in C# 
ADD CONTENT
Topic
Content
Source link
Name
9+5 =