Developer 02 55eb250d7e Deprecate controllers/services; simplify generics
Added `[Obsolete("Use MediatR")]` attributes to various controller and service classes to indicate deprecation in favor of MediatR. Simplified generic type constraints in `CRUDControllerBase` and related files by removing `IUnique<TId>`. Improved structure and documentation in `CSPMiddleware.cs`. Introduced new extension methods in `EntityExtensions.cs` for safer retrieval of 'Id' properties. Removed `IUnique.cs` interface and updated project dependencies in `DigitalData.Core.Application.csproj` for caching. Overall, these changes enhance code maintainability and clarity.
2025-05-16 14:54:31 +02:00

21 lines
1.3 KiB
C#

namespace DigitalData.Core.Application.Interfaces
{
/// <summary>
/// Implements a simplified CRUD service interface that uses a single Data Transfer Object (DTO) type for all CRUD operations,
/// streamlining the process for entities where the same DTO can be used for creating, reading, updating, and deleting entities.
/// This interface inherits from the ICRUDService interface, applying the same DTO type for all generic type parameters,
/// thereby simplifying the usage for cases where a single DTO is sufficient for all operations on an entity.
/// </summary>
/// <typeparam name="TDto">The type of the Data Transfer Object used for all CRUD operations.</typeparam>
/// <typeparam name="TEntity">The type of the entity this service maps to.</typeparam>
/// <typeparam name="TId">The type of the identifier for the entity.</typeparam>
/// <remarks>
/// This interface is useful for entities that do not require different DTOs for different operations,
/// allowing for a more concise and maintainable codebase when implementing services for such entities.
/// </remarks>
[Obsolete("Use MediatR")]
public interface IBasicCRUDService<TDto, TEntity, TId> : ICRUDService<TDto, TDto, TEntity, TId>
where TDto : class where TEntity : class
{
}
}