# 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/2d325b13709752ba6d9a943635c5e2940a2530c0)

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`
