dependency injection in net framework

hi all, i understand that in net core we can add dependency injection like this
IConfiguration Configuration = new ConfigurationBuilder()
  .AddJsonFile("appsettings.json", optional: true, reloadOnChange: true)
  .AddEnvironmentVariables()
  .AddCommandLine(args)
  .Build();

var builder = WebApplication.CreateBuilder(args);

// Add services to the container. 
builder.Services.AddControllersWithViews(); 
builder.Services.AddHttpClient(); 
builder.Services.AddScoped<Note>();


but this way doesnt seem to work in net framework, can anyone help advise how can we do this in net framework?
Was this page helpful?