# GrainServicesSiloBuilderExtensions.AddGrainService(IServiceCollection, Type)

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

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Runtime/Services/GrainServicesSiloBuilderExtensions.cs#L61)

```csharp
public static IServiceCollection AddGrainService(this IServiceCollection services, Type grainServiceType)
```

Registers an application grain service to be started with the silo.

### Parameters

- `services` (`IServiceCollection`): The service collection.
- `grainServiceType` (`Type`): The grain service implementation type.

### Returns

The service collection.
