---
title: Fixture and Create
description: Learn how Fixture.Create generates anonymous specimens for types you request.
---

`Fixture` is the main entry point. Call `Create<T>()` to get an anonymous instance of `T`.

## Example scenario

You are testing code that needs a `ClientDto` with a name and age. The exact values do not matter — you only need a populated object for the arrange step.

## Example

```csharp
var fixture = new Fixture();

var number = fixture.Create<int>();
var text = fixture.Create<string>();
var dto = fixture.Create<ClientDto>();

Assert.NotEqual(default, number);
Assert.False(string.IsNullOrEmpty(text));
Assert.False(string.IsNullOrEmpty(dto.Name));
```

Use `CreateMany<T>(count)` when you need several values:

```csharp
var values = fixture.CreateMany<int>(3).ToList();

Assert.Equal(3, values.Count);
Assert.True(values.Distinct().Count() > 1);
```

## How it works

- `new Fixture()` — starts a fresh generator for this test
- `Create<T>()` — resolves `T` through AutoFixture's [specimen pipeline](/docs/advanced/specimen-pipeline) (constructor, properties, nested types)
- `CreateMany<T>(count)` — returns an enumerable of distinct anonymous values
- **Different each call** — successive `Create<T>()` calls usually return different values, which helps avoid tests that pass only for one hard-coded number
- **Same value twice** — use `FromSeed` in [Customizations](/docs/fundamentals/customizations) or `Freeze` in [Register, Freeze, and Inject](/docs/how-to/register-freeze-inject) when a test needs repeatability or one shared instance

See also [Collections](/docs/how-to/collections).

## Next steps

- [Build DSL](/docs/fundamentals/build-dsl)
- [Customizations](/docs/fundamentals/customizations)
- [Specimen graphs](/docs/fundamentals/specimen-graphs)
- [Collections](/docs/how-to/collections)
- [Data annotations](/docs/how-to/data-annotations)
- [Your first test](/docs/get-started/first-test)

## API

- [`Fixture`](/api/autofixture/5-0-0-rc-1/autofixture.fixture)
- [`IFixture.Create`](/api/autofixture/5-0-0-rc-1/autofixture.ifixture#create)
