# ServiceCollectionExtensions.AddFromExisting(IServiceCollection)

[Type overview](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.configuration.internal.servicecollectionextensions/) | [Methods](/orleans/docs/api/csharp/microsoft.orleans.core/orleans.configuration.internal.servicecollectionextensions/methods/)

[Source](https://github.com/dotnet/orleans/blob/e4e752cedecc2976811db49802c7a999b1f1c704/src/Orleans.Core/Configuration/ServiceCollectionExtensions.cs#L21-L22)

```csharp
public static void AddFromExisting<TService, TImplementation>(this IServiceCollection services)
```

Registers an existing registration of `TImplementation` as a provider of service type `TService`.

### Parameters

- `services` (`IServiceCollection`): The service collection.
