public bool Invoke(Guid userId, Guid domainId) { if (userId == Guid.Empty || domainId == Guid.Empty) { return(false); } var user = userRepository.GetById(userId); if (user == null) { return(false); } var domain = domainRepository.GetById(domainId); if (domain == null) { return(false); } domain.Owner = user; domainRepository.Edit(domain); _unitOfWork.Save(); return(true); }