feat: ReadService hinzugefügt und in ReadController integriert
- Generischen ReadService erstellt, um Lese- (ReadById, ReadAll) und Löschoperationen zu verwalten. - ReadService in den ReadController integriert.
This commit is contained in:
@@ -13,13 +13,13 @@ namespace DigitalData.Core.API
|
||||
/// <typeparam name="TId">The type of the entity's identifier.</typeparam>
|
||||
[ApiController]
|
||||
[Route("api/[controller]")]
|
||||
public class ReadControllerBaseWithErrorHandling<TBasicCRUDService, TReadDto, TEntity, TId> : ControllerBase
|
||||
where TBasicCRUDService : IBasicCRUDService<TReadDto, TEntity, TId>
|
||||
public class ReadControllerBaseWithErrorHandling<TReadService, TReadDto, TEntity, TId> : ControllerBase
|
||||
where TReadService : IReadService<TReadDto, TEntity, TId>
|
||||
where TReadDto : class
|
||||
where TEntity : class
|
||||
{
|
||||
protected readonly ILogger _logger;
|
||||
protected readonly TBasicCRUDService _service;
|
||||
protected readonly TReadService _service;
|
||||
|
||||
/// <summary>
|
||||
/// Initializes a new instance of the CRUDControllerBase class with specified logger and CRUD service.
|
||||
@@ -28,7 +28,7 @@ namespace DigitalData.Core.API
|
||||
/// <param name="service">The CRUD service handling business logic for the entity.</param>
|
||||
public ReadControllerBaseWithErrorHandling(
|
||||
ILogger logger,
|
||||
TBasicCRUDService service)
|
||||
TReadService service)
|
||||
{
|
||||
_logger = logger;
|
||||
_service = service;
|
||||
|
||||
Reference in New Issue
Block a user