# StorageProviderAttribute

Package: [Microsoft.Orleans.Core.Abstractions](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/) 10.0.0

[NuGet package](https://www.nuget.org/packages/Microsoft.Orleans.Core.Abstractions) | [Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core.Abstractions/Providers/ProviderGrainAttributes.cs#L14)

```csharp
public sealed class StorageProviderAttribute : Attribute
```

The [Orleans.Providers.StorageProvider] attribute is used to define which storage provider to use for persistence of grain state. 

Specifying [Orleans.Providers.StorageProvider] property is recommended for all grains which extend Grain&lt;T&gt;. If no [Orleans.Providers.StorageProvider] attribute is specified, then a "Default" storage provider will be used. If a suitable storage provider cannot be located for this grain, then the grain will fail to load into the Silo.

## Constructors

- [StorageProviderAttribute](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.providers.storageproviderattribute/constructors/constructor-68830a65/)

## Properties

- [ProviderName](/orleans/docs/api/csharp/microsoft.orleans.core.abstractions/orleans.providers.storageproviderattribute/properties/providername-d6c8a159/)
