Update to latest version and show additional features

This commit is contained in:
2026-07-29 13:25:23 +02:00
parent 25690690d0
commit e44f2e7380
20 changed files with 804 additions and 31 deletions
+44
View File
@@ -0,0 +1,44 @@
using GerstITS.Data.EntityFramework;
using GerstITS.Examples.JobDashboard.Configurations;
using GerstITS.Examples.JobDashboard.Data;
using GerstITS.Examples.JobDashboard.Jobs;
using GerstITS.IoC;
using GerstITS.Job.Scheduling;
using Microsoft.EntityFrameworkCore;
using Microsoft.Extensions.DependencyInjection;
namespace GerstITS.Examples.JobDashboard;
public sealed class Module : IIoCModule<IServiceCollection>
{
#region IIoCModule
public void RegisterComponents(IServiceCollection container)
{
RegisterInMemoryStore(container);
RegisterJobs(container);
}
#endregion
#region Methods
private static void RegisterInMemoryStore(IServiceCollection container)
{
// The InMemory provider has no migrations, so disable the framework's auto-migration startup task.
container.AddSingleton<IEntityFrameworkMigrationConfiguration, NoDatabaseMigrationConfiguration>();
// Wire the EF Core InMemory provider through the framework's session (unit of work). No real database.
container.AddScoped<IDatabaseConfigurator, InMemoryDatabaseConfigurator>();
container.AddTransient(_ => new DbContextOptionsBuilder<JobRunDbContext>().Options);
container.AddScoped<JobRunDbContext>();
container.AddEntityFrameworkSession<JobRunDbContext>();
}
private static void RegisterJobs(IServiceCollection container)
{
container.RegisterJob<ReportGenerationJob, ReportGenerationJobConfiguration>(IgnoreConditions.EntityFramework, IgnoreConditions.Swagger);
}
#endregion
}