mirror of
https://github.com/C9Glax/tranga.git
synced 2025-07-04 01:44:17 +02:00
8 lines
310 B
C#
8 lines
310 B
C#
using Microsoft.EntityFrameworkCore;
|
|
|
|
namespace API.Workers;
|
|
|
|
public abstract class BaseWorkerWithContext<T>(IServiceScope scope, IEnumerable<BaseWorker>? dependsOn = null) : BaseWorker(dependsOn) where T : DbContext
|
|
{
|
|
protected T DbContext { get; init; } = scope.ServiceProvider.GetRequiredService<T>();
|
|
} |