# FirestoreStorageHostingExtensions Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.persistence.firestore/orleans.hosting.firestorestoragehostingextensions/)

## AddFirestoreGrainStorage(IServiceCollection, string, Action&lt;FirestoreStateStorageOptions&gt;) {#addfirestoregrainstorage-this-microsoft-extensions-dependencyinjection-iservicec-f8751afa}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.firestore/orleans.hosting.firestorestoragehostingextensions/methods/addfirestoregrainstorage-this-microsoft-extensions-dependencyinjection-iservicec-f8751afa/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Google/Orleans.Persistence.Firestore/FirestoreStorageHostingExtensions.cs)

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

Configure silo to use Google Firestore storage for grain storage.

### Parameters

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

## AddFirestoreGrainStorage(IServiceCollection, string, Action&lt;OptionsBuilder&lt;FirestoreStateStorageOptions&gt;&gt;) {#addfirestoregrainstorage-this-microsoft-extensions-dependencyinjection-iservicec-aad805b6}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.firestore/orleans.hosting.firestorestoragehostingextensions/methods/addfirestoregrainstorage-this-microsoft-extensions-dependencyinjection-iservicec-aad805b6/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Google/Orleans.Persistence.Firestore/FirestoreStorageHostingExtensions.cs)

```csharp
public static IServiceCollection AddFirestoreGrainStorage(this IServiceCollection services, string name, Action<OptionsBuilder<FirestoreStateStorageOptions>>? configureOptions = null)
```

Configure silo to use Google Firestore storage for grain storage.

### Parameters

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

## AddFirestoreGrainStorage(ISiloBuilder, string, Action&lt;FirestoreStateStorageOptions&gt;) {#addfirestoregrainstorage-this-orleans-hosting-isilobuilder-string-system-action-4629c151}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.firestore/orleans.hosting.firestorestoragehostingextensions/methods/addfirestoregrainstorage-this-orleans-hosting-isilobuilder-string-system-action-4629c151/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Google/Orleans.Persistence.Firestore/FirestoreStorageHostingExtensions.cs)

```csharp
public static ISiloBuilder AddFirestoreGrainStorage(this ISiloBuilder builder, string name, Action<FirestoreStateStorageOptions> configureOptions)
```

Configure silo to use Google Firestore storage for grain storage.

### Parameters

- `builder` (`ISiloBuilder`)
- `name` (`string`)
- `configureOptions` (`Action<FirestoreStateStorageOptions>`)

## AddFirestoreGrainStorage(ISiloBuilder, string, Action&lt;OptionsBuilder&lt;FirestoreStateStorageOptions&gt;&gt;) {#addfirestoregrainstorage-this-orleans-hosting-isilobuilder-string-system-action-3855d83d}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.firestore/orleans.hosting.firestorestoragehostingextensions/methods/addfirestoregrainstorage-this-orleans-hosting-isilobuilder-string-system-action-3855d83d/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Google/Orleans.Persistence.Firestore/FirestoreStorageHostingExtensions.cs)

```csharp
public static ISiloBuilder AddFirestoreGrainStorage(this ISiloBuilder builder, string name, Action<OptionsBuilder<FirestoreStateStorageOptions>>? configureOptions = null)
```

Configure silo to use Google Firestore storage for grain storage.

### Parameters

- `builder` (`ISiloBuilder`)
- `name` (`string`)
- `configureOptions` (`Action<OptionsBuilder<FirestoreStateStorageOptions>>`)

## AddFirestoreGrainStorageAsDefault(IServiceCollection, Action&lt;FirestoreStateStorageOptions&gt;) {#addfirestoregrainstorageasdefault-this-microsoft-extensions-dependencyinjection-8365c5bd}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.firestore/orleans.hosting.firestorestoragehostingextensions/methods/addfirestoregrainstorageasdefault-this-microsoft-extensions-dependencyinjection-8365c5bd/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Google/Orleans.Persistence.Firestore/FirestoreStorageHostingExtensions.cs)

```csharp
public static IServiceCollection AddFirestoreGrainStorageAsDefault(this IServiceCollection services, Action<FirestoreStateStorageOptions> configureOptions)
```

Configure silo to use Google Firestore storage as the default grain storage.

### Parameters

- `services` (`IServiceCollection`)
- `configureOptions` (`Action<FirestoreStateStorageOptions>`)

## AddFirestoreGrainStorageAsDefault(IServiceCollection, Action&lt;OptionsBuilder&lt;FirestoreStateStorageOptions&gt;&gt;) {#addfirestoregrainstorageasdefault-this-microsoft-extensions-dependencyinjection-40abd4d9}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.firestore/orleans.hosting.firestorestoragehostingextensions/methods/addfirestoregrainstorageasdefault-this-microsoft-extensions-dependencyinjection-40abd4d9/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Google/Orleans.Persistence.Firestore/FirestoreStorageHostingExtensions.cs)

```csharp
public static IServiceCollection AddFirestoreGrainStorageAsDefault(this IServiceCollection services, Action<OptionsBuilder<FirestoreStateStorageOptions>>? configureOptions = null)
```

Configure silo to use Google Firestore storage as the default grain storage.

### Parameters

- `services` (`IServiceCollection`)
- `configureOptions` (`Action<OptionsBuilder<FirestoreStateStorageOptions>>`)

## AddFirestoreGrainStorageAsDefault(ISiloBuilder, Action&lt;FirestoreStateStorageOptions&gt;) {#addfirestoregrainstorageasdefault-this-orleans-hosting-isilobuilder-system-actio-efefd3dc}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.firestore/orleans.hosting.firestorestoragehostingextensions/methods/addfirestoregrainstorageasdefault-this-orleans-hosting-isilobuilder-system-actio-efefd3dc/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Google/Orleans.Persistence.Firestore/FirestoreStorageHostingExtensions.cs)

```csharp
public static ISiloBuilder AddFirestoreGrainStorageAsDefault(this ISiloBuilder builder, Action<FirestoreStateStorageOptions> configureOptions)
```

Configure silo to use Google Firestore storage as the default grain storage.

### Parameters

- `builder` (`ISiloBuilder`)
- `configureOptions` (`Action<FirestoreStateStorageOptions>`)

## AddFirestoreGrainStorageAsDefault(ISiloBuilder, Action&lt;OptionsBuilder&lt;FirestoreStateStorageOptions&gt;&gt;) {#addfirestoregrainstorageasdefault-this-orleans-hosting-isilobuilder-system-actio-8865236c}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.persistence.firestore/orleans.hosting.firestorestoragehostingextensions/methods/addfirestoregrainstorageasdefault-this-orleans-hosting-isilobuilder-system-actio-8865236c/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Google/Orleans.Persistence.Firestore/FirestoreStorageHostingExtensions.cs)

```csharp
public static ISiloBuilder AddFirestoreGrainStorageAsDefault(this ISiloBuilder builder, Action<OptionsBuilder<FirestoreStateStorageOptions>>? configureOptions = null)
```

Configure silo to use Google Firestore storage as the default grain storage.

### Parameters

- `builder` (`ISiloBuilder`)
- `configureOptions` (`Action<OptionsBuilder<FirestoreStateStorageOptions>>`)
