Usually you need to inject interfaces, not implementations into your classes.
But suppose you have:
interface IFooService { }
class FooService { }
Registration builder.RegisterType<FooService>()allows you to enter FooService, but you cannot embed IFooService, it even FooServiceimplements it. It is equivalent builder.RegisterType<FooService>().AsSelf().
builder.RegisterType<FooService>().As<IFooService>() IFooService, FooService - .As<T> "" " ", .
, , AsSelf() : builder.RegisterType<FooService>().As<IFooService>().AsSelf().
, builder.RegisterType<SomeType>().AsImplementedInterfaces() - , .
, Autofac ( ).
, Autofac