DataForger

API Reference

Every method on the DataForger builder, at a glance.


Builder methods

  • ForCountry(Country country) — selects the country provider and returns a builder
  • WithSeed(int seed) — makes all following generation deterministic
  • Use(Generator<T> generator) — registers a custom generator
  • Create<T>() — generates one instance of T
  • Create<T>(int count) — generates a collection of T

Country enum

  • Country.PT, Country.ES, Country.FR, Country.DE
  • Country.GB, Country.US, Country.BR

Example

csharp
var orders = DataForger
    .ForCountry(Country.FR)
    .WithSeed(42)
    .Create<Order>(500);