public async Task <bool> SatisfiedBy(TradeEntity entity) { if (await tradeRepository.CountAsync(x => x.UserId == entity.UserId) > 0) { throw new DomainException("创建交易不能重复,请重新添加!"); } return(true); }