Refactor TestControllerBase and update using directives

Consolidated using directives and removed unnecessary ones.
Added attributes to the namespace declaration for API routing
and deprecation notice. Simplified the class definition by
removing the IUnique<TId> constraint and cleaned up the
constructor by eliminating empty braces.
This commit is contained in:
tekh 2025-06-27 12:13:13 +02:00
parent 231140505e
commit f5d33846d5

View File

@ -1,18 +1,18 @@
using DigitalData.Core.API;
using DigitalData.Core.Abstraction.Application;
using Microsoft.AspNetCore.Mvc;
using DigitalData.Core.Abstractions;
namespace EnvelopeGenerator.Web.Controllers.Test
namespace EnvelopeGenerator.Web.Controllers.Test;
[ApiController]
[Route("api/test/[controller]")]
[Obsolete("Use MediatR")]
public class TestControllerBase<TCRUDService, TDto, TEntity, TId> : BasicCRUDControllerBase<TCRUDService, TDto, TEntity, TId>
where TCRUDService : ICRUDService<TDto, TDto, TEntity, TId>
where TDto : class
where TEntity : class
{
[ApiController]
[Route("api/test/[controller]")]
public class TestControllerBase<TCRUDService, TDto, TEntity, TId> : BasicCRUDControllerBase<TCRUDService, TDto, TEntity, TId>
where TCRUDService : ICRUDService<TDto, TDto, TEntity, TId>
where TDto : class, IUnique<TId> where TEntity : class, IUnique<TId>
public TestControllerBase(ILogger logger, TCRUDService service) : base(logger, service)
{
public TestControllerBase(ILogger logger, TCRUDService service) : base(logger, service)
{
}
}
}