Skip to content
New issue

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

Rule set for dynamic schema #463

Open
jvmlet opened this issue Feb 12, 2023 · 1 comment
Open

Rule set for dynamic schema #463

jvmlet opened this issue Feb 12, 2023 · 1 comment
Labels

Comments

@jvmlet
Copy link

jvmlet commented Feb 12, 2023

Is it possible to configure Bogus to generate amorphic data container according to dynamic schema ?
I'm discovering arbitrary DB table and have System.Data.DataColumn[] as the discovered schema.
From this schema I want to generate multiple System.Data.DataRow elements, that comply with the discovered schema :

var row = table.NewRow()
foreach(c: table.Columns){
row[name] = faker.RandomValueForType(c.DataType)
}

The above pseudo code would be great to have as generator/instantiator which can be shared.
Thanks

@ChristoWolf
Copy link

Hi @jvmlet!

I guess something like this would be pretty easy to achieve using AutoBogus.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants