-
Notifications
You must be signed in to change notification settings - Fork 3
Open
Description
It seems cleaner to place our dependencies in a separate file so as not to overload the Statup.cs file.
Like this :
public void ConfigureServices(IServiceCollection services)
{
// ...
DependenciesConfig.Configure(services, Configuration);
}
DependenciesConfig.cs :
public static class DependenciesConfig
{
public static void Configure(IServiceCollection services, IConfiguration configuration)
{
services.AddTransient<ILoginService, LoginService>();
services.AddScoped<AuthenticationStateProvider, CustomAuthenticationStateProvider>();
services.AddHttpClient<IConnexionService, ConnexionService>();
services.AddHttpClient<IUserService, UserService>();
//...
}
}
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels