Following this example I can create a service with multiple interfaces
builder.Services.AddSingleton<SweetAlert>();
builder.Services.AddSingleton<ISweetAlert, SweetAlert>(implementationFactory: x =>
x.GetRequiredService<SweetAlert>());
builder.Services.AddSingleton<ISweetAlert2, SweetAlert>(x =>
x.GetRequiredService<SweetAlert>());
builder.Services.AddAutoMapper(typeof(Program));
But then how do I inject it into the class? Either I don't get it or the author doesn't address the situation.
Because it has two interfaces the usual constructor injection won't work.