feat(ProfileObjStateService): ReadAsync-Methode als Schnittstellenimplementierung erstellt.
This commit is contained in:
parent
5327249f5e
commit
2c66112d4d
@ -1,4 +1,5 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Abstractions.Application;
|
||||||
|
using DigitalData.Core.DTO;
|
||||||
using WorkFlow.Application.DTO.ProfileObjState;
|
using WorkFlow.Application.DTO.ProfileObjState;
|
||||||
using WorkFlow.Domain.Entities;
|
using WorkFlow.Domain.Entities;
|
||||||
|
|
||||||
@ -6,5 +7,9 @@ namespace WorkFlow.Application.Contracts
|
|||||||
{
|
{
|
||||||
public interface IProfileObjStateService : ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjStateUpdateDto, ProfileObjState, int>
|
public interface IProfileObjStateService : ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjStateUpdateDto, ProfileObjState, int>
|
||||||
{
|
{
|
||||||
|
Task<DataResult<IEnumerable<ProfileObjStateDto>>> 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);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -1,6 +1,7 @@
|
|||||||
using AutoMapper;
|
using AutoMapper;
|
||||||
using DigitalData.Core.Abstractions.Application;
|
using DigitalData.Core.Abstractions.Application;
|
||||||
using DigitalData.Core.Application;
|
using DigitalData.Core.Application;
|
||||||
|
using DigitalData.Core.DTO;
|
||||||
using WorkFlow.Application.Contracts;
|
using WorkFlow.Application.Contracts;
|
||||||
using WorkFlow.Application.DTO.ProfileObjState;
|
using WorkFlow.Application.DTO.ProfileObjState;
|
||||||
using WorkFlow.Domain.Entities;
|
using WorkFlow.Domain.Entities;
|
||||||
@ -12,5 +13,20 @@ namespace WorkFlow.Application.Services
|
|||||||
: CRUDService<IProfileObjStateRepository, ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjStateUpdateDto, ProfileObjState, int>(repository, mapper),
|
: CRUDService<IProfileObjStateRepository, ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjStateUpdateDto, ProfileObjState, int>(repository, mapper),
|
||||||
IProfileObjStateService, ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjStateUpdateDto, ProfileObjState, int>
|
IProfileObjStateService, ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjStateUpdateDto, ProfileObjState, int>
|
||||||
{
|
{
|
||||||
|
public async Task<DataResult<IEnumerable<ProfileObjStateDto>>> 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<IEnumerable<ProfileObjStateDto>>(pos_list);
|
||||||
|
|
||||||
|
return Result.Success(post_dto_list);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user