Flip ITrackService/TrackManager to DTO output; TrackConverter is the sole entity<->DTO path across all consumers
This commit is contained in:
@@ -1,15 +1,20 @@
|
||||
using DeepDrftModels.Entities;
|
||||
using DeepDrftModels.DTOs;
|
||||
using Models.Common;
|
||||
using NetBlocks.Models;
|
||||
|
||||
namespace DeepDrftData;
|
||||
|
||||
/// <summary>
|
||||
/// SQL-side track service. Repository outputs entities; this service outputs DTOs via
|
||||
/// TrackConverter. In-process consumers (UnifiedTrackService, CLI, DeepDrftPublic) all
|
||||
/// receive DTOs.
|
||||
/// </summary>
|
||||
public interface ITrackService
|
||||
{
|
||||
Task<ResultContainer<TrackEntity?>> GetById(long id);
|
||||
Task<ResultContainer<List<TrackEntity>>> GetAll();
|
||||
Task<ResultContainer<PagedResult<TrackEntity>>> GetPaged(int pageNumber, int pageSize, string? sortColumn, bool sortDescending, CancellationToken cancellationToken = default);
|
||||
Task<ResultContainer<TrackEntity>> Create(TrackEntity newTrack);
|
||||
Task<ResultContainer<TrackEntity>> Update(TrackEntity track);
|
||||
Task<ResultContainer<TrackDto?>> GetById(long id);
|
||||
Task<ResultContainer<List<TrackDto>>> GetAll();
|
||||
Task<ResultContainer<PagedResult<TrackDto>>> GetPaged(int pageNumber, int pageSize, string? sortColumn, bool sortDescending, CancellationToken cancellationToken = default);
|
||||
Task<ResultContainer<TrackDto>> Create(TrackDto newTrack);
|
||||
Task<ResultContainer<TrackDto>> Update(TrackDto track);
|
||||
Task<Result> Delete(long id);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user