示例#1
0
            public async Task <Unit> Handle(DeleteCommand request, CancellationToken cancellationToken)
            {
                var success = await _profileRepository.DeleteAsyncCustomerId(request.CustomerId, cancellationToken) > 0;

                if (success)
                {
                    return(Unit.Value);
                }

                throw new RestException(System.Net.HttpStatusCode.InternalServerError, new { Message = "Problem saving changes" });
            }