Can I ask why you have used AutoFac and not the built in IoC for .NET Core? Is it not possible to do this with the built in IoC?