Skip to content

Commit 84e6567

Browse files
arnaudleclercArnaud Leclerc
andauthored
Register MapService as scoped (#99)
Co-authored-by: Arnaud Leclerc <arnaud.leclerc@ascent.io>
1 parent 0d8839d commit 84e6567

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/AzureMapsControl.Components/Extensions.cs

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -26,9 +26,9 @@ public static class Extensions
2626
public static IServiceCollection AddAzureMapsControl(this IServiceCollection services, Action<AzureMapsConfiguration> configure)
2727
{
2828
services
29-
.AddSingleton<MapService>()
30-
.AddSingleton<IMapAdderService>(sp => sp.GetRequiredService<MapService>())
31-
.AddSingleton<IMapService>(sp => sp.GetRequiredService<MapService>())
29+
.AddScoped<MapService>()
30+
.AddScoped<IMapAdderService>(sp => sp.GetRequiredService<MapService>())
31+
.AddScoped<IMapService>(sp => sp.GetRequiredService<MapService>())
3232
.AddScoped<IAnimationService, AnimationService>()
3333
.AddScoped<IMapJsRuntime, MapJsRuntime>()
3434
.AddScoped<IGeolocationService, GeolocationService>()

0 commit comments

Comments
 (0)