StrangerData 101.0.0

dotnet add package StrangerData --version 101.0.0
NuGet\Install-Package StrangerData -Version 101.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="StrangerData" Version="101.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add StrangerData --version 101.0.0
#r "nuget: StrangerData, 101.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install StrangerData as a Cake Addin
#addin nuget:?package=StrangerData&version=101.0.0

// Install StrangerData as a Cake Tool
#tool nuget:?package=StrangerData&version=101.0.0

StrangerData - A .NET database populator for testing purposes

Project Description

StrangerData is a tool designed to automatically fills your database with random data to make your unit/integration tests faster.
The generator will auto maps all foreign keys and generates records to related tables.


Consider the example schema:

Person Table
Column Data Type PK FK
Id INT True False
Name VARCHAR(20) False False
Email VARCHAR(50) False False
Age INT False False
TeamId INT False Team(Id)
Team Table
Column Data Type PK FK
Id INT True False
Name VARCHAR(20) False False

1. Creates a single record:

IDicionary<string, object> record = dataFactory.CreateOne("dbo.Person");

The method will creates an record in the group table, and associates it to the created user. The dictionary will contains:

  "Id": "Generated User's Id",
  "Name": "Random string",
  "Email": "Random string",
  "Age": "Random integer number",
  "TeamId": "Id from generated group record"

So you can specify your custom values. Do following:

User user = dataFactory.CreateOne("dbo.Person", t => {
    t.WithValue("Name", "Will Byers");

The dictionary will contains:

  "Id": "Generated User's Id",
  "Name": "Will Byers",
  "Email": "Random string",
  "Age": "Random integer number",
  "TeamId": "Id from generated group record"

2. Delete generated records:

To delete all generated records, just run:


We suggest to use the TearDown() method inside yor Finally scope. This way it will run even if you code crashes on running, avoiding to have dirty data on your database.

Product 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 is compatible.  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. 
.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 net452 is compatible.  net46 was computed.  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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages (1)

Showing the top 1 NuGet packages that depend on StrangerData:

Package Downloads

MS SQL Server Dialect for StrangerData data generator.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
101.0.0 1,039 2/8/2024
100.0.1 18,464 3/23/2021
100.0.0 755 3/19/2021
99.99.99 19,298 10/31/2017
1.0.64 3,044 5/27/2017
1.0.63 1,265 3/8/2017
1.0.62 1,302 2/17/2017
1.0.45 971 1/9/2017
1.0.42 945 1/9/2017
1.0.39 1,270 10/13/2016
1.0.37 1,969 10/13/2016
1.0.35 1,204 10/7/2016
0.0.5 1,290 9/20/2016
0.0.4 1,254 8/25/2016
0.0.3 1,859 8/1/2016
0.0.2 1,744 7/26/2016