# AdoNetGrainStorageServiceCollectionExtensions.AddAdoNetGrainStorage(IServiceCollection, string, Action&lt;AdoNetGrainStorageOptions&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.persistence.adonet/orleans.hosting.adonetgrainstorageservicecollectionextensions/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.persistence.adonet/orleans.hosting.adonetgrainstorageservicecollectionextensions/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/AdoNet/Orleans.Persistence.AdoNet/Storage/Provider/AdoNetGrainStorageServiceCollectionExtensions.cs)

```csharp
public static IServiceCollection AddAdoNetGrainStorage(this IServiceCollection services, string name, Action<AdoNetGrainStorageOptions> configureOptions)
```

Configure silo to use AdoNet grain storage for grain storage. Instructions on configuring your database are available at [http://aka.ms/orleans-sql-scripts](http://aka.ms/orleans-sql-scripts).

### Parameters

- `services` (`IServiceCollection`)
- `name` (`string`)
- `configureOptions` (`Action<AdoNetGrainStorageOptions>`)
