# FaultInjectionGrainStorageFactory Methods

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.faultinjectiongrainstoragefactory/)

## Create(IServiceProvider, string, Func&lt;IServiceProvider, string, IGrainStorage&gt;) {#create-system-iserviceprovider-string-system-func-system-iserviceprovider-string-4acd3e55}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.faultinjectiongrainstoragefactory/methods/create-system-iserviceprovider-string-system-func-system-iserviceprovider-string-4acd3e55/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.TestingHost/TestStorageProviders/FaultInjectionStorageProvider.cs#L175-L176)

```csharp
public static IGrainStorage Create(IServiceProvider services, string name, Func<IServiceProvider, string, IGrainStorage> injectedGrainStorageFactory)
```

Creates a new [FaultInjectionGrainStorage](/orleans/docs/api/csharp/microsoft.orleans.testinghost/orleans.testinghost.faultinjectiongrainstorage/) instance.

### Parameters

- `services` (`IServiceProvider`): The services.
- `name` (`string`): The storage provider name.
- `injectedGrainStorageFactory` (`Func<IServiceProvider, string, IGrainStorage>`): The injected grain storage factory.

### Returns

The new instance.
