title: Register an Autofac module and return IServiceCollection
body: <p>I have the API configuration splitted into two projects (the principal and the secondary). In the principal Startup.cs, I configure Autofac, and in the secondary, I use the IServiceCollection returned by the principal.</p>
  
  <p>For register an Autofac module, I should code:</p>
  
  <pre><code>public IServiceProvider ConfigureServices(IServiceCollection services)
  {
      services.AddMvc();
  
      var container = new ContainerBuilder();
      container.Populate(services);
      container.RegisterModule(new ApplicationModule());
      return new AutofacServiceProvider(container.Build()); // Instead of 'return services;'
  }
  </code></pre>
  
  <p>And if you see the returned type, it's IServiceProvider instead of IServiceCollection. How can I register a module, but return IServiceCollection? I have tried to cast from IServiceProvider to IServiceCollection, but an exception is raised.</p>