# WithOrleansProviderType

- Module: [Aspire.Hosting.Orleans](/reference/api/go/aspire.hosting.orleans.md)
- Version: `17.0.0`
- Kind: `method`
- Defined on: `ResourceWithConnectionString`
- Source: [GitHub](https://github.com/microsoft/aspire/tree/bcfa151cdca6d0a573f22d5d9c23f9c727cb3b2f)

Configures a resource to use the specified Orleans provider type.

## Remarks

Use this when a resource can be used as a drop-in replacement for an Orleans provider type that is
inferred from a different resource name. For example, Garnet can be used wherever Orleans expects a
Redis provider.

## Definition

```go
func (ResourceWithConnectionString) WithOrleansProviderType(providerType string) ResourceWithConnectionString
```

## Parameters

- `providerType` (`string`) -- The Orleans provider type to use for the resource.

## Returns

`ResourceWithConnectionString` -- The resource builder.

Returns a handle; failures surface later via `Err()`.

## Applies to

- `ResourceWithConnectionString`
