Extending the Bogus fake data generator

Fri, Jun 21, 2019

Read in 1 minutes

I often use the Bogus Fake Data Generator for both testing and mockup usage. When you use the same modifications time and time again, it can be easier to write an extension.

I regularly deal with UK school data. Every school has a unique identifying code called the DfE Code. The format is:

There can be special meaning to the initial digits of the school portion of the code, however, I ignore them for this purpose.

I’ve decided to make my extension publicly available via Nuget with the source code on GitHub. As always, I welcome code reviews and feedback.

Check out the Bogus project for yourself.