Xfty.AutoBogus 1.0.0-beta.2

This is a prerelease version of Xfty.AutoBogus.
There is a newer prerelease version of this package available.
See the version list below for details.
dotnet add package Xfty.AutoBogus --version 1.0.0-beta.2
                    
NuGet\Install-Package Xfty.AutoBogus -Version 1.0.0-beta.2
                    
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="Xfty.AutoBogus" Version="1.0.0-beta.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Xfty.AutoBogus" Version="1.0.0-beta.2" />
                    
Directory.Packages.props
<PackageReference Include="Xfty.AutoBogus" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add Xfty.AutoBogus --version 1.0.0-beta.2
                    
#r "nuget: Xfty.AutoBogus, 1.0.0-beta.2"
                    
#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.
#:package Xfty.AutoBogus@1.0.0-beta.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=Xfty.AutoBogus&version=1.0.0-beta.2&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Xfty.AutoBogus&version=1.0.0-beta.2&prerelease
                    
Install as a Cake Tool

Xfty.AutoBogus

Pairs Xfty with AutoBogus - AutoFixture-style auto-population, plus Bogus's realistic generators - in both directions. Mirrors Xfty.AutoFixture exactly, for AutoBogus instead of AutoFixture.

dotnet add package Xfty.AutoBogus

1. Point AutoBogus at a RecordProvider

using AutoBogus;
using Net.Nowhereatall.Xfty.AutoBogus;

IAutoFaker faker = XftyAutoBogus.CreateFaker(lookup);

Contact contact = faker.Generate<Contact>();
// contact.AccountId is set - the required Account relationship was
// generated by XFTY, not left null.

Anything requested that XFTY has no Provider for is generated by AutoBogus exactly as normal. CreateFaker defaults to InsertMode.Mock and InsertInclusivity.Required - not RecordProvider's own default of None - because AutoBogus users expect Generate<T>() to hand back a complete object; both are overridable explicitly.

2. Let AutoBogus fill in what a Provider left unset

using AutoBogus;
using Net.Nowhereatall.Xfty.AutoBogus;

Account account = (Account)new RecordProvider(typeof(Account), lookup)
    .SetInsertMode(InsertMode.Mock)
    .SetUnsetFieldFiller(new AutoBogusUnsetFieldFiller(faker))
    .Supply();

// account.Name/.Industry/... are exactly what the Provider declared.
// account.NumberOfEmployees, .AnnualRevenue, .Site, ... - fields the
// Master Template never mentions at all - now hold real AutoBogus values.

Unlike AutoFixture's default ThrowingRecursionBehavior, AutoBogus never throws on a self-referencing field (Account.Parent) - it just stops recursing past a fixed depth - so AutoBogusUnsetFieldFiller needs no recursion-exception handling at all.

Full documentation

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

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last Updated
1.0.0-beta.13 85 10/9/2026
1.0.0-beta.12 84 9/18/2026
1.0.0-beta.11 80 9/10/2026
1.0.0-beta.10 327 9/10/2026
1.0.0-beta.9 82 9/10/2026
1.0.0-beta.8 80 9/10/2026
1.0.0-beta.7 86 9/7/2026
1.0.0-beta.6 92 9/7/2026
1.0.0-beta.5 87 9/6/2026
1.0.0-beta.3 99 9/6/2026
1.0.0-beta.2 82 9/6/2026
1.0.0-beta.1 98 9/6/2026