refactor: IUnique<TId>-Einschränkungen in den Basis-Controller-Klassen durchsetzen

- Aktualisiert ReadControllerBase, um zu verlangen, dass TEntity IUnique<TId> implementiert
- BasicCRUDControllerBase geändert, um sicherzustellen, dass sowohl TDto als auch TEntity IUnique<TId> implementieren
This commit is contained in:
Developer 02
2024-09-13 16:40:26 +02:00
parent 0bf8979a09
commit dcd54266c0
2 changed files with 5 additions and 4 deletions

View File

@@ -1,3 +1,4 @@
using DigitalData.Core.Abstractions;
using DigitalData.Core.Abstractions.Application;
using DigitalData.Core.DTO;
using Microsoft.AspNetCore.Mvc;
@@ -15,7 +16,7 @@ namespace DigitalData.Core.API
public class ReadControllerBase<TBasicCRUDService, TReadDto, TEntity, TId> : ControllerBase
where TBasicCRUDService : IBasicCRUDService<TReadDto, TEntity, TId>
where TReadDto : class
where TEntity : class
where TEntity : class, IUnique<TId>
{
protected readonly ILogger _logger;
protected readonly TBasicCRUDService _service;