public async Task <Unit> Handle(UpdateRepoCommand request, CancellationToken cancellationToken) { var existingRepo = await _repoRepository.GetById(request.Id); if (existingRepo == null) { throw new Exception("Repository not found. Update failed"); } request.Repository.Id = existingRepo.Id; request.Repository.LastUpdated = DateTime.Now; await _repoRepository.Update(existingRepo.Id, request.Repository); return(Unit.Value); }