# OrleansSiloGenericHostExtensions.AddOrleans(IServiceCollection, Action&lt;ISiloBuilder&gt;)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/microsoft.extensions.hosting.orleanssilogenerichostextensions/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.runtime/microsoft.extensions.hosting.orleanssilogenerichostextensions/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Hosting/OrleansSiloGenericHostExtensions.cs#L141-L147)

```csharp
public static IServiceCollection AddOrleans(this IServiceCollection services, Action<ISiloBuilder> configureDelegate)
```

Configures the service collection to host an Orleans silo.

### Parameters

- `services` (`IServiceCollection`): The service collection.
- `configureDelegate` (`Action<ISiloBuilder>`): The delegate used to configure the silo.

### Returns

The service collection.
