Replace registered services in Asp.Net Core built-in DI Container

added by DotNetKicks
12/10/2018 2:43:54 PM

1 Kicks, 106 Views

If you want to replace registered services of built-in DI container then you can do that with Replace extension method of ServiceCollection. Recently I was doing some work related to identity where I need to replace Net Core Identity's default UserValidator logic with my own custom logic (need to implement support for a duplicate username in user table).