public async Task <IResult> Handle(DeleteGroupClaimCommand request, CancellationToken cancellationToken) { var groupClaimToDelete = await _groupClaimDal.GetAsync(x => x.Id == request.Id); await _groupClaimDal.DeleteAsync(groupClaimToDelete); return(new SuccessResult(Messages.GroupClaimDeleted)); }
public async Task <IDataResult <GroupClaim> > Handle(GetGroupClaimQuery request, CancellationToken cancellationToken) { return(new SuccessDataResult <GroupClaim>(await _groupClaimDal.GetAsync(x => x.Id == request.Id))); }