<!-- mobian-agent-page publisher="dailydev" canonical="https://daily.dev/posts/bogus---generate-realistic-fake-data-in-c--mzyjb16sl" -->

---
title: Bogus - Generate Realistic Fake Data in C# | daily.dev
description: Bogus is a C# port of faker.js used to generate realistic fake data for names, addresses, finance, and commerce fields. The piece walks through installing the...
canonical: https://daily.dev/posts/bogus---generate-realistic-fake-data-in-c--mzyjb16sl
twitter:card: summary_large_image
twitter:site: @dailydotdev
og:type: website
og:site_name: daily.dev
og:title: Bogus - Generate Realistic Fake Data in C# | daily.dev
og:description: Bogus is a C# port of faker.js used to generate realistic fake data for names, addresses, finance, and commerce fields. The piece walks through installing the...
og:url: https://daily.dev/posts/bogus---generate-realistic-fake-data-in-c--mzyjb16sl
og:image: https://api.daily.dev/og/posts/mZyJB16sL.png
og:image:alt: Bogus - Generate Realistic Fake Data in C#
og:image:width: 1200
og:image:height: 630
og:locale: en
---

> ## Documentation Index
> Fetch the complete documentation index at: https://daily.dev/llms.txt
> Use this file to discover all available pages before exploring further.

# Bogus - Generate Realistic Fake Data in C#

**[NikolaTech](https://daily.dev/sources/nikolatech)** · 4 min read · 0 upvotes · 0 comments

## Summary

Bogus is a C# port of faker.js used to generate realistic fake data for names, addresses, finance, and commerce fields. The piece walks through installing the NuGet package, using Faker<T> with RuleFor() to define fluent data generation rules, creating nested fake objects, achieving deterministic output via global or local seeds, generating localized data, and seeding an Entity Framework Core database with HasData(). It closes by pointing to the Bogus GitHub repo and example source code.

## Full article

daily.dev links to this article rather than hosting it. Read it at the original source: <https://nikolatech.net/blogs/bogus-ganerate-fake-data>

## Questions this post answers

### How do I generate deterministic fake data with Bogus in C#?

Set a seed value so the same fake data is produced on every run. Global seed determinism is done via Randomizer.Seed = new Random(1234), which affects all fakers but can be disrupted by code changes elsewhere. Local seed determinism uses faker.UseSeed(seed).Generate() on a specific Faker instance, giving more isolated, reliable reproducibility for that object.

_daily.dev surfaces practical C# testing patterns like this for developers wiring up repeatable test data._

### How can I seed an Entity Framework Core database with fake data using Bogus?

Use a Faker<T> inside OnModelCreating to define rules for each property, then call modelBuilder.Entity<T>().HasData(faker.Generate(count)) to seed the table. For example, a Product faker can set incrementing ids, commerce product names, categories, and random prices, generating 1000 fake rows for development or testing environments.

_Developers setting up EF Core seed data can find workflows like this through daily.dev._

## Similar posts on daily.dev

- [Getting started with Faker.js: A developer’s guide](https://daily.dev/posts/getting-started-with-faker-js-a-developer-s-guide-f8bp3hir2) · Testim.io · 0 upvotes · 0 comments

---

Tags: [#testing](https://daily.dev/tags/testing), [#.net](https://daily.dev/tags/.net), [#c#](https://daily.dev/tags/c#)

[View this post on daily.dev](https://daily.dev/posts/bogus---generate-realistic-fake-data-in-c--mzyjb16sl)

```json
{"@context":"https://schema.org","@graph":[{"@type":"Organization","@id":"https://daily.dev/#organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180},"sameAs":["https://twitter.com/dailydotdev","https://github.com/dailydotdev","https://www.linkedin.com/company/daily-dev-ltd"]},{"@type":"WebSite","@id":"https://daily.dev/#website","url":"https://daily.dev","name":"daily.dev","publisher":{"@id":"https://daily.dev/#organization"},"potentialAction":{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https://daily.dev/search?q={search_term_string}"},"query-input":"required name=search_term_string"}}]}
{"@context":"https://schema.org","@type":"TechArticle","headline":"Bogus - Generate Realistic Fake Data in C#","url":"https://daily.dev/posts/bogus---generate-realistic-fake-data-in-c--mzyjb16sl","mainEntityOfPage":{"@type":"WebPage","@id":"https://daily.dev/posts/bogus---generate-realistic-fake-data-in-c--mzyjb16sl"},"datePublished":"2026-10-04T13:07:30.982Z","dateModified":"2026-10-04T13:18:33.817Z","description":"Bogus is a C# port of faker.js used to generate realistic fake data for names, addresses, finance, and commerce fields. The piece walks through installing the...","image":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/92659068082d82c774d4c21606e826db?_a=AQAEuop","thumbnailUrl":"https://media.daily.dev/image/upload/f_auto,q_auto/v1/posts/92659068082d82c774d4c21606e826db?_a=AQAEuop","isAccessibleForFree":true,"articleSection":"NikolaTech","inLanguage":"en","publisher":{"@type":"Organization","name":"daily.dev","url":"https://daily.dev","logo":{"@type":"ImageObject","url":"https://daily.dev/apple-touch-icon.png","width":180,"height":180}},"author":{"@type":"Organization","name":"NikolaTech","logo":"https://media.daily.dev/image/upload/s--1h2fO6FL--/f_auto,q_auto/v1791119050/logos/nikolatech?_a=BAMAMicg0","url":"https://daily.dev/sources/nikolatech"},"commentCount":0,"discussionUrl":"https://daily.dev/posts/bogus---generate-realistic-fake-data-in-c--mzyjb16sl","interactionStatistic":[{"@type":"InteractionCounter","interactionType":{"@type":"LikeAction"},"userInteractionCount":0},{"@type":"InteractionCounter","interactionType":{"@type":"CommentAction"},"userInteractionCount":0}],"keywords":"testing,.net,c#","timeRequired":"PT4M"}
{"@context":"https://schema.org","@type":"BreadcrumbList","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https://daily.dev"},{"@type":"ListItem","position":2,"name":"NikolaTech","item":"https://daily.dev/sources/nikolatech"},{"@type":"ListItem","position":3,"name":"Bogus - Generate Realistic Fake Data in C#"}]}
{"@context":"https://schema.org","@type":"FAQPage","@id":"https://daily.dev/posts/bogus---generate-realistic-fake-data-in-c--mzyjb16sl#faq","mainEntity":[{"@type":"Question","name":"How do I generate deterministic fake data with Bogus in C#?","acceptedAnswer":{"@type":"Answer","text":"Set a seed value so the same fake data is produced on every run. Global seed determinism is done via Randomizer.Seed = new Random(1234), which affects all fakers but can be disrupted by code changes elsewhere. Local seed determinism uses faker.UseSeed(seed).Generate() on a specific Faker instance, giving more isolated, reliable reproducibility for that object. daily.dev surfaces practical C# testing patterns like this for developers wiring up repeatable test data."}},{"@type":"Question","name":"How can I seed an Entity Framework Core database with fake data using Bogus?","acceptedAnswer":{"@type":"Answer","text":"Use a Faker<T> inside OnModelCreating to define rules for each property, then call modelBuilder.Entity<T>().HasData(faker.Generate(count)) to seed the table. For example, a Product faker can set incrementing ids, commerce product names, categories, and random prices, generating 1000 fake rows for development or testing environments. Developers setting up EF Core seed data can find workflows like this through daily.dev."}}]}
```

