Ejemplo n.º 1
0
            public async Task <IResult> Handle(DeleteGroupClaimCommand request, CancellationToken cancellationToken)
            {
                var groupClaimToDelete = await _groupClaimDal.GetAsync(x => x.Id == request.Id);

                _groupClaimDal.Delete(groupClaimToDelete);
                await _groupClaimDal.SaveChangesAsync();

                return(new SuccessResult(Messages.GroupClaimDeleted));
            }
Ejemplo n.º 2
0
            public async Task <IResult> Handle(UpdateGroupClaimCommand request, CancellationToken cancellationToken)
            {
                var entityToUpdate = new GroupClaim
                {
                    ClaimId = request.ClaimId,
                    GroupId = request.GroupId,
                    Id      = request.Id
                };

                _groupClaimDal.Update(entityToUpdate);
                await _groupClaimDal.SaveChangesAsync();

                return(new SuccessResult(Messages.GroupClaimUpdated));
            }