stuff
This commit is contained in:
parent
14fd359ea8
commit
a4ef2b4a20
26 changed files with 331 additions and 78 deletions
|
@ -6,6 +6,13 @@ public class BlogApplication(IHost host) : BackgroundService
|
|||
{
|
||||
protected override async Task ExecuteAsync(CancellationToken stoppingToken)
|
||||
{
|
||||
await host.RunAsync(stoppingToken);
|
||||
try
|
||||
{
|
||||
await host.RunAsync(stoppingToken);
|
||||
}
|
||||
catch (TaskCanceledException)
|
||||
{
|
||||
//ignore
|
||||
}
|
||||
}
|
||||
}
|
|
@ -52,11 +52,6 @@ public static class BlogStartup
|
|||
c.RegisterServicesFromAssembly(typeof(BlogStartup).Assembly);
|
||||
});
|
||||
|
||||
services.AddScoped<DbContext>(s => s.GetRequiredService<BlogContext>());
|
||||
|
||||
services.AddTransient(
|
||||
typeof(IPipelineBehavior<,>),
|
||||
typeof(SaveChangesPipelineBehaviour<,>)
|
||||
);
|
||||
services.ConfigureDomainServices<BlogContext>();
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue