refactor: ICRUDService, CRUDService, CRUDRepository und ICRUDRepository um IUnique<TId> Einschränkung zu erzwingen

- `IUnique<TId>` Einschränkung zu `TEntity` in den Schnittstellen `ICRUDService`, `CRUDService`, `ICRUDRepository` und `CRUDRepository` hinzugefügt.
- Relevanten Code aktualisiert, um die neue Einschränkung zu berücksichtigen und sicherzustellen, dass Entitäten `IUnique<TId>` implementieren.
This commit is contained in:
Developer 02
2024-09-11 09:54:26 +02:00
parent b6cd520b72
commit a6230419d8
4 changed files with 6 additions and 5 deletions

View File

@@ -1,4 +1,5 @@
using DigitalData.Core.Abstractions.Infrastructure;
using DigitalData.Core.Abstractions;
using DigitalData.Core.Abstractions.Infrastructure;
using Microsoft.EntityFrameworkCore;
namespace DigitalData.Core.Infrastructure
@@ -14,7 +15,7 @@ namespace DigitalData.Core.Infrastructure
/// It leverages the EF Core's DbContext and DbSet to perform these operations.
/// </remarks>
public class CRUDRepository<TEntity, TId, TDbContext> : ICRUDRepository<TEntity, TId>
where TEntity : class
where TEntity : class, IUnique<TId>
where TDbContext : DbContext
{
protected readonly TDbContext _dbContext;