Skip to content

Commit

Permalink
Modifying service lifetime in pipeline
Browse files Browse the repository at this point in the history
  • Loading branch information
Edrisym committed Nov 3, 2024
1 parent 6a02102 commit 5f107ae
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,9 @@


builder.Services.Configure<GoogleCalendarSettings>(builder.Configuration.GetSection(nameof(GoogleCalendarSettings)));
//TODO
builder.Services.AddTransient<IGoogleCalendarService, GoogleCalendarService>();
builder.Services.AddTransient<IOAuthService, OAuthService>();

builder.Services.AddScoped<IGoogleCalendarService, GoogleCalendarService>();
builder.Services.AddScoped<IOAuthService, OAuthService>();

var app = builder.Build();

Expand Down

0 comments on commit 5f107ae

Please sign in to comment.