Autofac DI container in console app
Your Main method has too many responsibilities: it's your application's composition root, and it's executing the program's logic... if printing to Console can be considered logic.

There's not enough meat in this project to even justify using DI/IoC: you have a service that nothing depends on.

If you had, say, an Application class:

public interface IApplication
{
    void Run();
}

public class Application : IApplication
{
    private readonly IBatchService _service;
    public Application(IBatchService service)
    {
        _service = service;
    }

    public void Run()
    {
        _service.WriteInformation("Injected!");
    }
}


...then composition would refer to resolving all dependencies of an Application instance, regardless of how complex that might be.

The Main method would only ask for an Application instance (let's call it app), and your IoC container would do its job - the Main method would only call app.Run();, and the rest of the application doesn't need to know there's an IoC container involved.



You don't need the static IContainer field; I've never used Autofac (you should look into Ninject, seems much simpler), but your IoC container should only live (and die) in the Main method - if you're using it anywhere else, you're doing something wrong (Service Locator).

I'd make it something like this:

static void Main(string[] args)
{
    var builder = new ContainerBuilder();

    builder.RegisterType&lt;BatchService.BatchService&gt;().As&lt;IBatchService&gt;();
    var container = builder.Build();

    using (var scope = container.BeginLifetimeScope())
    {
        var app = scope.Resolve&lt;IApplication&gt;();
        app.Run();
    }
}


Then your Main method is done with. If you're going to expand the application, you just inject new dependencies, and consume them.

Actually, this:


builder.RegisterType&lt;BatchService.BatchService&gt;().As&lt;IBatchService&gt;();



I'd move elsewhere; as your application grows, you'll be registering tons of stuff here, registration is a concern of its own, that deserves its own class IMO. That class can be static for all you care, it's infrastructure stuff, its only goal is to spit out a configured IContainer.

The configuration class could look like this:

public static class ContainerConfig
{
    public static IContainer Configure()
    {
        var builder = new ContainerBuilder();

        builder.RegisterType&lt;BatchService.BatchService&gt;().As&lt;IBatchService&gt;();
        // add other registrations here...

        return builder.Build();
    }
}


Leaving your Main method like this:

static void Main(string[] args)
{
    var container = ContainerConfig.Configure();
    using (var scope = container.BeginLifetimeScope())
    {
        var app = scope.Resolve&lt;IApplication&gt;();
        app.Run();
    }
}