Assuming that I have the following interface and class:
public interface IFooRepo : IDisposable { //... } public FooRepo : IFooRepo { //Methods here
This portion comes into lifetime management in IOC or DI Container.
As you are using AutoFac following link may help you. http://autofac.readthedocs.io/en/latest/lifetime/disposal.html
Also look at section of "Controlling scope and lifetime" for autofac.