refactor(ProfileService): CRUDService-Implementierung entfernen
This commit is contained in:
parent
f8be2d9f26
commit
537891b8c5
@ -3,13 +3,12 @@ using DigitalData.Core.DTO;
|
|||||||
using WorkFlow.Application.DTO.ProfileObjState;
|
using WorkFlow.Application.DTO.ProfileObjState;
|
||||||
using WorkFlow.Domain.Entities;
|
using WorkFlow.Domain.Entities;
|
||||||
|
|
||||||
namespace WorkFlow.Application.Contracts
|
namespace WorkFlow.Application.Contracts;
|
||||||
|
|
||||||
|
public interface IProfileObjStateService : ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, int>
|
||||||
{
|
{
|
||||||
public interface IProfileObjStateService : ICRUDService<ProfileObjStateCreateDto, ProfileObjStateDto, ProfileObjState, int>
|
Task<DataResult<IEnumerable<ProfileObjStateDto>>> ReadAsync(
|
||||||
{
|
bool withProfile = true, bool withUser = true, bool withState = true,
|
||||||
Task<DataResult<IEnumerable<ProfileObjStateDto>>> ReadAsync(
|
int? userId = null, string? username = null,
|
||||||
bool withProfile = true, bool withUser = true, bool withState = true,
|
int? profileId = null, int? objId = null);
|
||||||
int? userId = null, string? username = null,
|
|
||||||
int? profileId = null, int? objId = null, bool? profileActive = null);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -1,10 +1,5 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
namespace WorkFlow.Application.Contracts;
|
||||||
using WorkFlow.Application.DTO.Profile;
|
|
||||||
using WorkFlow.Domain.Entities;
|
|
||||||
|
|
||||||
namespace WorkFlow.Application.Contracts
|
public interface IProfileService
|
||||||
{
|
{
|
||||||
public interface IProfileService : ICRUDService<ProfileCreateDto, ProfileDto, Profile, int>
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
@ -19,13 +19,13 @@ public class ProfileObjStateService : CRUDService<IProfileObjStateRepository, Pr
|
|||||||
public async Task<DataResult<IEnumerable<ProfileObjStateDto>>> ReadAsync(
|
public async Task<DataResult<IEnumerable<ProfileObjStateDto>>> ReadAsync(
|
||||||
bool withProfile = true, bool withUser = true, bool withState = true,
|
bool withProfile = true, bool withUser = true, bool withState = true,
|
||||||
int? userId = null, string? username = null,
|
int? userId = null, string? username = null,
|
||||||
int? profileId = null, int? objId = null, bool? profileActive = null)
|
int? profileId = null, int? objId = null)
|
||||||
{
|
{
|
||||||
var pos_list = await _repository.ReadAsync(
|
var pos_list = await _repository.ReadAsync(
|
||||||
isReadonly: true,
|
isReadonly: true,
|
||||||
withProfile: withProfile, withUser: withUser, withState: withState,
|
withProfile: withProfile, withUser: withUser, withState: withState,
|
||||||
userId: userId, username: username,
|
userId: userId, username: username,
|
||||||
profileId: profileId, objId: objId, profileActive: profileActive);
|
profileId: profileId, objId: objId);
|
||||||
|
|
||||||
var post_dto_list = _mapper.Map<IEnumerable<ProfileObjStateDto>>(pos_list);
|
var post_dto_list = _mapper.Map<IEnumerable<ProfileObjStateDto>>(pos_list);
|
||||||
|
|
||||||
|
|||||||
@ -1,16 +1,7 @@
|
|||||||
using DigitalData.Core.Abstractions.Application;
|
using WorkFlow.Application.Contracts;
|
||||||
using DigitalData.Core.Application;
|
|
||||||
using WorkFlow.Application.Contracts;
|
|
||||||
using WorkFlow.Application.DTO.Profile;
|
|
||||||
using WorkFlow.Domain.Entities;
|
|
||||||
using WorkFlow.Infrastructure.Contracts;
|
|
||||||
|
|
||||||
namespace WorkFlow.Application.Services;
|
namespace WorkFlow.Application.Services;
|
||||||
|
|
||||||
public class ProfileService : CRUDService<IProfileRepository, ProfileCreateDto, ProfileDto, Profile, int>,
|
public class ProfileService : IProfileService
|
||||||
IProfileService, ICRUDService<ProfileCreateDto, ProfileDto, Profile, int>
|
|
||||||
{
|
{
|
||||||
public ProfileService(IProfileRepository repository, AutoMapper.IMapper mapper) : base(repository, mapper)
|
|
||||||
{
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
Loading…
x
Reference in New Issue
Block a user