示例#1
0
 public DefinirPalestranteCommandValidator(IPalestraRepository repository)
 {
     RuleFor(x => x.PalestraId)
     .NotEmpty()
     .MustAsync(async(id, cancellationToken) => await repository.Exists(id))
     .WithMessage(Messages.IdNotFound);
 }