We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I think it would be really useful that PickRandom could return more than one item.
.RuleFor(x => x.Tags, y => tags.OrderBy(z => Guid.NewGuid()).Take(4).ToList())
I think instead the following could be done:
.RuleFor(x => x.Tags, y => y.PickRandom(tags, 4))
Internally, the following could be used:
collection.OrderBy(x => Guid.NewGuid()).Take(n)
or any other option ...
Thanks, Miguel
The text was updated successfully, but these errors were encountered:
Hi Miguel,
The API already has something similar. You could do this also:
.RuleFor(x => x.Tags, y => y.Random.Shuffle(tags).Take(4))
Sorry, something went wrong.
Got it ... missed that. Thanks
No branches or pull requests
Hello,
I think it would be really useful that PickRandom could return more than one item.
I think instead the following could be done:
Internally, the following could be used:
or any other option ...
Thanks,
Miguel
The text was updated successfully, but these errors were encountered: