public async Task <BusinessResult <bool> > Handle(DeleteGdprCommand request, CancellationToken cancellationToken) { var result = new BusinessResult <bool>(); var updatedDomain = _gdprDomainRepository.FindBy(request.Id); if (updatedDomain == null) { result.AddBrokenRule(new BusinessError("Record does not exist")); return(result); } _gdprDomainRepository.Remove(updatedDomain); await _unitOfWork.SaveChangesAsync(cancellationToken); result.Model = true; return(result); }