using ErsatzTV.Core.Interfaces.Repositories; using static ErsatzTV.Application.Libraries.Mapper; namespace ErsatzTV.Application.Libraries; public class GetLocalLibraryByIdHandler : IRequestHandler> { private readonly ILibraryRepository _libraryRepository; public GetLocalLibraryByIdHandler(ILibraryRepository libraryRepository) => _libraryRepository = libraryRepository; public Task> Handle( GetLocalLibraryById request, CancellationToken cancellationToken) => _libraryRepository.GetLocal(request.LibraryId).MapT(ProjectToViewModel); }