fix: CRUDRepository Konstruktor aktualisiert, um DbSet<TEntity> als Parameter zu akzeptieren
- `CRUDRepository` Konstruktor geändert, um `DbSet<TEntity>` direkt zu akzeptieren. - Erlaubt flexible Handhabung von `DbSet`-Instanzen beim Erstellen des Repositories.
This commit is contained in:
parent
a6230419d8
commit
f6d5305c22
@ -25,10 +25,10 @@ namespace DigitalData.Core.Infrastructure
|
|||||||
/// Initializes a new instance of the CRUDRepository with the specified DbContext.
|
/// Initializes a new instance of the CRUDRepository with the specified DbContext.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <param name="dbContext">The DbContext instance to be used by the repository.</param>
|
/// <param name="dbContext">The DbContext instance to be used by the repository.</param>
|
||||||
public CRUDRepository(TDbContext dbContext)
|
public CRUDRepository(TDbContext dbContext, DbSet<TEntity> dbSet)
|
||||||
{
|
{
|
||||||
_dbContext = dbContext;
|
_dbContext = dbContext;
|
||||||
_dbSet = dbContext.Set<TEntity>();
|
_dbSet = dbSet;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user