# FileSiloBuilderExtensions.AddFileGrainStorage(IServiceCollection, string, Action&lt;FileGrainStorageOptions&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.persistence.filestorage.filesilobuilderextensions/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.persistence.filestorage.filesilobuilderextensions/methods/)

[Source](https://github.com/dotnet/orleans/blob/1644940b035c7bdf215a4fd7135757c06bcfe9ec/src/Orleans.Runtime/Persistence/FileStorage/FileSiloBuilderExtensions.cs#L66-L77)

```csharp
public static IServiceCollection AddFileGrainStorage(this IServiceCollection services, string providerName, Action<FileGrainStorageOptions> options)
```

Configures a named file grain storage provider.

### Parameters

- `services` (`IServiceCollection`): The service collection.
- `providerName` (`string`): The storage provider name.
- `options` (`Action<FileGrainStorageOptions>`): The configuration delegate.

### Returns

The service collection.
