diff --git a/WorkFlow.Application/Contracts/IProfileControlsTFService.cs b/WorkFlow.Application/Contracts/IProfileControlsTFService.cs index 4e8385f..6525dc9 100644 --- a/WorkFlow.Application/Contracts/IProfileControlsTFService.cs +++ b/WorkFlow.Application/Contracts/IProfileControlsTFService.cs @@ -1,4 +1,5 @@ using DigitalData.Core.Abstractions.Application; +using DigitalData.Core.DTO; using WorkFlow.Application.DTO.ProfileControlsTF; using WorkFlow.Domain.Entities; @@ -6,5 +7,9 @@ namespace WorkFlow.Application.Contracts { public interface IProfileControlsTFService : ICRUDService { + Task>> ReadAsync( + bool withProfile = true, bool withUser = false, + int? userId = null, string? username = null, + int? profileId = null, int? objId = null, bool? profileActive = null); } } \ No newline at end of file diff --git a/WorkFlow.Application/Services/ProfileControlsTFService.cs b/WorkFlow.Application/Services/ProfileControlsTFService.cs index c853817..e419a23 100644 --- a/WorkFlow.Application/Services/ProfileControlsTFService.cs +++ b/WorkFlow.Application/Services/ProfileControlsTFService.cs @@ -1,6 +1,7 @@ using AutoMapper; using DigitalData.Core.Abstractions.Application; using DigitalData.Core.Application; +using DigitalData.Core.DTO; using WorkFlow.Application.Contracts; using WorkFlow.Application.DTO.ProfileControlsTF; using WorkFlow.Domain.Entities; @@ -12,5 +13,20 @@ namespace WorkFlow.Application.Services : CRUDService(repository, mapper), IProfileControlsTFService, ICRUDService { + public async Task>> ReadAsync( + bool withProfile = true, bool withUser = false, + int? userId = null, string? username = null, + int? profileId = null, int? objId = null, bool? profileActive = null) + { + var pctf_list = await _repository.ReadAsync( + isReadonly: true, + withProfile: withProfile, withUser: withUser, + userId: userId, username: username, + profileId: profileId, objId: objId, profileActive: profileActive); + + var pctf_dto_list = _mapper.Map>(pctf_list); + + return Result.Success(pctf_dto_list); + } } } \ No newline at end of file