AspNetCore.Docs icon indicating copy to clipboard operation
AspNetCore.Docs copied to clipboard

Set default type of resolving dependency injection of an interface.

Open TomYip opened this issue 7 years ago • 1 comments

With default service container, is there a way to set the default type when resolving dependency injection of an interface, like what's in the Autofac sample in the above?

    builder.RegisterType<CharacterRepository>().As<ICharacterRepository>();

Document Details

⚠ Do not edit this section. It is required for docs.microsoft.com ➟ GitHub issue linking.

TomYip avatar Mar 22 '19 22:03 TomYip

I don't think so.

Rick-Anderson avatar Mar 23 '19 06:03 Rick-Anderson