DataForger.Abstractions
0.1.0
Prefix Reserved
dotnet add package DataForger.Abstractions --version 0.1.0
NuGet\Install-Package DataForger.Abstractions -Version 0.1.0
<PackageReference Include="DataForger.Abstractions" Version="0.1.0" />
<PackageVersion Include="DataForger.Abstractions" Version="0.1.0" />
<PackageReference Include="DataForger.Abstractions" />
paket add DataForger.Abstractions --version 0.1.0
#r "nuget: DataForger.Abstractions, 0.1.0"
#:package DataForger.Abstractions@0.1.0
#addin nuget:?package=DataForger.Abstractions&version=0.1.0
#tool nuget:?package=DataForger.Abstractions&version=0.1.0
DataForger
A lightweight, extensible, enterprise-ready synthetic test data generation library for .NET.
DataForger creates deterministic, country-specific, clearly synthetic data — no real personal information is ever used, no network or file access happens at runtime, and the same seed always produces the same dataset. It targets .NET Standard 2.0 and is thread-safe and DI-friendly.
using DataForger;
var customer = Forge.ForCountry(Country.PT).WithSeed(1234).Create<Customer>();
var customers = Forge.ForCountry(Country.BR).WithSeed(42).Create<Customer>(1000);
Why DataForger?
- Deterministic — the same seed + country + entity type always yields the same data. Dates are anchored to a fixed epoch (2025-01-01 UTC), so results never depend on the wall clock and are stable across .NET runtime versions.
- Country-aware — built-in providers for Portugal, Spain, United Kingdom, France, Germany, United States and Brazil: names, phone formats, postal codes and country-validated tax identifiers (NIF/NIPC, DNI/CIF, CPF/CNPJ, SSN-like, EIN, SIREN, ...).
- No real PII — names are curated common names, e-mails use RFC 2606 reserved domains
(
example.com,example.net,example.org), and US SSN-like numbers use the never-issued9xxarea. - Extensible — implement
IDataGenerator<T>orICountryDataProviderand plug into the fluent API; optional provider capabilities (e.g.IPersonTaxIdentifierProvider) can grow without breaking changes. - Enterprise-ready — strong-named, XML-documented, StyleCop-clean, SourceLink-enabled, zero compiler warnings, and a CI pipeline in this repository.
Getting started
Reference the packages from your project (or add project references to
src/):DataForger— the fluent entry point.DataForger.Abstractions— entities, interfaces, enums (reference this in extension libraries).DataForger.CountryProviders— the built-in country data providers.DataForger.Generators— the built-in entity generators.DataForger.Extensions— optional extension methods (e.g.WithSeed(string)).
Build a
Forgefor a country and generate:
// Single entity
var person = Forge.ForCountry(Country.PT).Create<Person>();
// Deterministic batch
var contracts = Forge.ForCountry(Country.UK).WithSeed(2024).Create<Contract>(500);
// Text seed via the extensions package
var products = Forge.ForCountry(Country.DE).WithSeed("demo-fixture").Create<Product>(100);
- Use the entities in your tests, demos or development databases.
Note on the entry point name. The original specification used
DataForger.ForCountry(...), but C# forbids a type and a namespace from sharing a name, so the facade is the static classForgein theDataForgernamespace:Forge.ForCountry(Country.PT). Everything else in the public API matches the specification.
Built-in entities
| Entity | Key generated fields |
|---|---|
Person |
First/last/full name, e-mail, phone, date of birth, gender |
Address |
Street, number, postal code, city, country |
Company |
Name, country tax identifier, e-mail, phone, address |
Customer |
GUID id, customer number, name, e-mail, phone, billing address |
Contract |
Contract number, start/end dates, customer, status |
Product |
SKU, name, description, price |
See docs/api.md for the full public API surface.
Quick API reference
Forge.ForCountry(Country country) // entry point
Forge.ForCountry(Country country, ICountryDataProviderRegistry registry) // custom providers
forge.WithSeed(int seed) // deterministic
forge.WithSeed(string seed) // extension: FNV-1a hash
forge.Register<TGenerator>() // custom generator
forge.Create<T>() // single entity
forge.Create<T>(int count) // IReadOnlyCollection<T>
Thread safety
Forge instances are safe to share across threads: the generator registry is a
ConcurrentDictionary, the seed is read/written atomically, and every generation call receives a
fresh, private context with its own random source. Configure the instance (seed, registrations)
before generating from multiple threads.
Documentation
- Architecture overview
- Public API reference
- Extending DataForger — custom generators, providers and capabilities
- Security considerations — threat model, misuse, validation, determinism
- Contributing
Building and testing
dotnet build DataForger.slnx
dotnet test DataForger.slnx
dotnet pack DataForger.slnx -c Release
Packages land in artifacts/packages/.
Icons
Package icons: <a href="https://www.flaticon.com/free-icons/forging" title="forging icons">Forging icons created by Nikita Golubev - Flaticon</a>
License
MIT — see LICENSE.
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. net10.0 was computed. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
| .NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
| .NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
| .NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
| MonoAndroid | monoandroid was computed. |
| MonoMac | monomac was computed. |
| MonoTouch | monotouch was computed. |
| Tizen | tizen40 was computed. tizen60 was computed. |
| Xamarin.iOS | xamarinios was computed. |
| Xamarin.Mac | xamarinmac was computed. |
| Xamarin.TVOS | xamarintvos was computed. |
| Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- No dependencies.
NuGet packages (4)
Showing the top 4 NuGet packages that depend on DataForger.Abstractions:
| Package | Downloads |
|---|---|
|
DataForger.CountryProviders
Country-specific data providers for DataForger (Portugal, Spain, United Kingdom, France, Germany, United States, Brazil). |
|
|
DataForger.Generators
Built-in entity generators for DataForger (person, address, company, customer, contract, product). |
|
|
DataForger
DataForger is a lightweight, extensible, enterprise-ready synthetic test data generator for .NET with deterministic, country-specific data. |
|
|
DataForger.Extensions
Convenience extensions for DataForger, including string-based deterministic seeds. |
GitHub repositories
This package is not used by any popular GitHub repositories.
| Version | Downloads | Last Updated |
|---|---|---|
| 0.1.0 | 219 | 10/9/2026 |