Files

14 lines
501 B
C#

using adas_core.Authentication.Interfaces;
using Microsoft.Extensions.DependencyInjection;
namespace adas_core.Authentication.RegistrationExtensions;
public static class AuthRegistration
{
public static void AddAuth(this IServiceCollection serviceCollection)
{
serviceCollection.AddSingleton<IUserService, UserService>();
serviceCollection.AddSingleton<Lazy<IUserService>>(provider =>
new Lazy<IUserService>(provider.GetRequiredService<IUserService>));
}
}