# Options Pattern

Binding configuration to a typed class injected as IOptions&lt;T>.

## What is **Options Pattern**?

The **options pattern** binds a section of configuration to a typed class, which you inject as `IOptions<T>`.

```csharp
public sealed class RecipeOptions { public int PageSize { get; set; } = 20; }

builder.Services.Configure<RecipeOptions>(builder.Configuration.GetSection("Recipes"));

public class RecipeService(IOptions<RecipeOptions> options) { }
```

Level: Journeyman · [More ASP.NET Core terms at this level](https://www.ask-codey.com/glossary?category=aspnet-core&level=3)

Updated: September 27, 2026

Source: https://www.ask-codey.com/glossary/options-pattern
