public void Delete(Guid id) { var user = _userRepository.Find(id); if (user == null) throw new Exception("删除的用户不存在"); _userRepository.Delete(user); }