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.
This commit is contained in:
@@ -1,13 +1,11 @@
|
||||
using DigitalData.Core.Abstractions;
|
||||
|
||||
namespace DigitalData.Core.Application.Interfaces.Repository
|
||||
namespace DigitalData.Core.Application.Interfaces.Repository
|
||||
{
|
||||
/// <summary>
|
||||
/// Defines the contract for CRUD operations on a repository for entities of type TEntity.
|
||||
/// </summary>
|
||||
/// <typeparam name="TEntity">The type of the entity this repository works with.</typeparam>
|
||||
/// <typeparam name="TId">The type of the identifier for the entity.</typeparam>
|
||||
public interface ICRUDRepository<TEntity, TId> where TEntity : class, IUnique<TId>
|
||||
public interface ICRUDRepository<TEntity, TId> where TEntity : class
|
||||
{
|
||||
/// <summary>
|
||||
/// Adds a new entity to the repository.
|
||||
|
||||
Reference in New Issue
Block a user