Refactored ICRUDService interface to remove the generic TCRUDRepository parameter for simplification and improved readability.

This commit is contained in:
Developer 02
2024-06-15 00:41:24 +02:00
parent 0697f5ff58
commit 3844f9d8d8
8 changed files with 29 additions and 32 deletions

View File

@@ -1,5 +1,4 @@
using DigitalData.Core.Contracts.Application;
using DigitalData.Core.Contracts.Infrastructure;
using DigitalData.Core.DTO;
using Microsoft.AspNetCore.Mvc;
@@ -16,9 +15,8 @@ namespace DigitalData.Core.API
/// <typeparam name="TId">The type of the entity's identifier.</typeparam>
[ApiController]
[Route("api/[controller]")]
public class CRUDControllerBase<TCRUDService, TCRUDRepository, TCreateDto, TReadDto, TUpdateDto, TEntity, TId> : ControllerBase
where TCRUDService : ICRUDService<TCRUDRepository, TCreateDto, TReadDto, TUpdateDto, TEntity, TId>
where TCRUDRepository : ICRUDRepository<TEntity, TId>
public class CRUDControllerBase<TCRUDService, TCreateDto, TReadDto, TUpdateDto, TEntity, TId> : ControllerBase
where TCRUDService : ICRUDService<TCreateDto, TReadDto, TUpdateDto, TEntity, TId>
where TCreateDto : class
where TReadDto : class
where TUpdateDto : class