title: Using autofac in asp.net core 2.2
body: <p>I am trying to use latest Autofac with asp.net core 2.2 project. However documentation of autofac seems to be outdated.
  I am trying to use autofac without ConfigureContainer:</p>
  
  <pre><code>// ConfigureServices is where you register dependencies. This gets
    // called by the runtime before the Configure method, below.
    public IServiceProvider ConfigureServices(IServiceCollection services)
    {
      // Add services to the collection.
      services.AddMvc();
  
      // Create the container builder.
      var builder = new ContainerBuilder();
  
      // Register dependencies, populate the services from
      // the collection, and build the container.
      //
      // Note that Populate is basically a foreach to add things
      // into Autofac that are in the collection. If you register
      // things in Autofac BEFORE Populate then the stuff in the
      // ServiceCollection can override those things; if you register
      // AFTER Populate those registrations can override things
      // in the ServiceCollection. Mix and match as needed.
      builder.Populate(services);
      builder.RegisterType&lt;MyType&gt;().As&lt;IMyType&gt;();
      this.ApplicationContainer = builder.Build();
  
      // Create the IServiceProvider based on the container.
      return new AutofacServiceProvider(this.ApplicationContainer);
    }
  </code></pre>
  
  <p>but the ConfigureServices method signature is different in asp.net core 2.2</p>
  
  <pre><code>public void ConfigureServices(IServiceCollection services)
  {
  }
  </code></pre>
  
  <p>there is not return type.
  Anyone knows how to use autofac in asp.net core 2.2?</p>