Skip to content

Commit

Permalink
Small ASP.NET Core example code improvement (#126)
Browse files Browse the repository at this point in the history
* Fixed (typo)bug in ASP.NET Core example code

* small example improvement
  • Loading branch information
HenrikHoyer authored Mar 15, 2024
1 parent 8dd66e9 commit eb5205e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion getting-started/aspnet-core-applications.rst
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ Starting with ``Hangfire.AspNetCore 1.7.8``, Hangfire officially supports ASP.NE
:emphasize-lines: 6,9
// This method gets called by the runtime. Use this method to configure the HTTP request pipeline.
public void Configure(IApplicationBuilder app, IWebHostEnvironment env)
public void Configure(IApplicationBuilder app, IBackgroundJobClient backgroundJobs, IWebHostEnvironment env)
{
app.UseRouting();
app.UseAuthorization();
Expand All @@ -140,6 +140,8 @@ Starting with ``Hangfire.AspNetCore 1.7.8``, Hangfire officially supports ASP.NE
endpoints.MapControllers();
endpoints.MapHangfireDashboard();
});
backgroundJobs.Enqueue(() => Console.WriteLine("Hello world from Hangfire!"));
}
Expand Down

0 comments on commit eb5205e

Please sign in to comment.