# WithMemoryGrainStorage

- Module: [Aspire.Hosting.Orleans](/reference/api/go/aspire.hosting.orleans.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: [`OrleansService`](/reference/api/go/aspire.hosting.orleans/orleansservice.md)
- Source: [GitHub](https://github.com/microsoft/aspire/tree/2d325b13709752ba6d9a943635c5e2940a2530c0)

Adds an in-memory grain storage to the Orleans service.

## Definition

```go
func (OrleansService) WithMemoryGrainStorage(name string) OrleansService
```

## Parameters

- `name` (`string`) -- The name of the provider. This is the name the application will use to resolve the provider.

## Returns

[`OrleansService`](/reference/api/go/aspire.hosting.orleans/orleansservice.md) -- The Orleans service builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- [`OrleansService`](/reference/api/go/aspire.hosting.orleans/orleansservice.md)
