using AutoMapper; using DigitalData.Core.Abstractions.Application; using DigitalData.Core.Application; using DigitalData.Core.DTO; using WorkFlow.Application.Contracts; using WorkFlow.Application.DTO.ProfileObjState; using WorkFlow.Domain.Entities; using WorkFlow.Infrastructure.Contracts; namespace WorkFlow.Application.Services { public class ProfileObjStateService(IProfileObjStateRepository repository, IMapper mapper) : CRUDService(repository, mapper), IProfileObjStateService, ICRUDService { public async Task>> ReadAsync( bool withProfile = true, bool withUser = true, bool withState = true, int? userId = null, string? username = null, int? profileId = null, int? objId = null, bool? profileActive = null) { var pos_list = await _repository.ReadAsync( isReadonly: true, withProfile: withProfile, withUser: withUser, withState: withState, userId: userId, username: username, profileId: profileId, objId: objId, profileActive: profileActive); var post_dto_list = _mapper.Map>(pos_list); return Result.Success(post_dto_list); } } }