# GrainService Constructors

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.grainservice/)

## GrainService {#constructor-79f77688}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.grainservice/constructors/constructor-79f77688/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.Runtime/Services/GrainService.cs#L44-L46)

```csharp
[System.Obsolete(Do not call the empty constructor.)]
protected GrainService()
```

Only to make Reflection happy. Do not use it in your implementation

## GrainService(GrainId, Silo, ILoggerFactory) {#constructor-orleans-runtime-grainid-orleans-runtime-silo-microsoft-extensions-lo-63201a35}

[Dedicated page](/orleans/docs/api/csharp/microsoft.orleans.runtime/orleans.runtime.grainservice/constructors/constructor-orleans-runtime-grainid-orleans-runtime-silo-microsoft-extensions-lo-63201a35/)

[Source](https://github.com/dotnet/orleans/blob/b7a9e3e1c9c54b3cec3a467c5734bf7744541bcf/src/Orleans.Runtime/Services/GrainService.cs#L62-L64)

```csharp
protected GrainService(GrainId grainId, Silo silo, ILoggerFactory loggerFactory)
```

Constructor to use for grain services

### Parameters

- `grainId` (`GrainId`)
- `silo` (`Silo`)
- `loggerFactory` (`ILoggerFactory`)
