[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-08-28 UTC."],[[["\u003cp\u003eThis documentation covers the \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class, which provides extension methods for configuring API clients within the Google Cloud Database Migration v1 service.\u003c/p\u003e\n"],["\u003cp\u003eThe latest version of the API is 2.5.0, and the documentation also includes references for versions ranging from 1.0.0 to 2.4.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class includes two methods, \u003ccode\u003eAddDataMigrationServiceClient\u003c/code\u003e, for adding a singleton \u003ccode\u003eDataMigrationServiceClient\u003c/code\u003e to a service collection, with options for configuring the client using an \u003ccode\u003eAction\u003c/code\u003e delegate.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddDataMigrationServiceClient\u003c/code\u003e methods allow for customization of the client builder either directly or through an \u003ccode\u003eIServiceProvider\u003c/code\u003e, providing flexibility in how the client is configured.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class inherits from the \u003ccode\u003eobject\u003c/code\u003e class and includes inherited members such as \u003ccode\u003eGetHashCode\u003c/code\u003e, \u003ccode\u003eGetType\u003c/code\u003e, \u003ccode\u003eMemberwiseClone\u003c/code\u003e, and \u003ccode\u003eToString\u003c/code\u003e.\u003c/p\u003e\n"]]],[],null,["# Database Migration v1 API - Class ServiceCollectionExtensions (2.5.0)\n\nVersion latestkeyboard_arrow_down\n\n- [2.5.0 (latest)](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.4.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.2.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.1.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.0.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/2.0.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.2.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/1.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.1.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/1.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.0](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/1.0.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Database Migration v1 API class ServiceCollectionExtensions.\n\nStatic class to provide extension methods to configure API clients. \n\nInheritance\n-----------\n\n[object](https://learn.microsoft.com/dotnet/api/system.object) \\\u003e ServiceCollectionExtensions \n\nInherited Members\n-----------------\n\n[object.GetHashCode()](https://learn.microsoft.com/dotnet/api/system.object.gethashcode) \n[object.GetType()](https://learn.microsoft.com/dotnet/api/system.object.gettype) \n[object.MemberwiseClone()](https://learn.microsoft.com/dotnet/api/system.object.memberwiseclone) \n[object.ToString()](https://learn.microsoft.com/dotnet/api/system.object.tostring)\n\nNamespace\n---------\n\n[Microsoft.Extensions.DependencyInjection](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.CloudDms.V1.dll\n\nMethods\n-------\n\n### AddDataMigrationServiceClient(IServiceCollection, Action\\\u003cDataMigrationServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddDataMigrationServiceClient(this IServiceCollection services, Action\u003cDataMigrationServiceClientBuilder\u003e action = null)\n\nAdds a singleton [DataMigrationServiceClient](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.DataMigrationServiceClient) to `services`.\n\n### AddDataMigrationServiceClient(IServiceCollection, Action\\\u003cIServiceProvider, DataMigrationServiceClientBuilder\\\u003e)\n\n public static IServiceCollection AddDataMigrationServiceClient(this IServiceCollection services, Action\u003cIServiceProvider, DataMigrationServiceClientBuilder\u003e action)\n\nAdds a singleton [DataMigrationServiceClient](/dotnet/docs/reference/Google.Cloud.CloudDms.V1/latest/Google.Cloud.CloudDms.V1.DataMigrationServiceClient) to `services`."]]