[[["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\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class provides extension methods for configuring API clients within the Google Cloud AlloyDB v1alpha API.\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the \u003ccode\u003eMicrosoft.Extensions.DependencyInjection\u003c/code\u003e namespace, located in the \u003ccode\u003eGoogle.Cloud.AlloyDb.V1Alpha.dll\u003c/code\u003e assembly.\u003c/p\u003e\n"],["\u003cp\u003eIt offers methods like \u003ccode\u003eAddAlloyDBAdminClient\u003c/code\u003e to add a singleton \u003ccode\u003eAlloyDBAdminClient\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddAlloyDBAdminClient\u003c/code\u003e method can be configured using an optional \u003ccode\u003eAction\u003c/code\u003e on the \u003ccode\u003eAlloyDBAdminClientBuilder\u003c/code\u003e, either with just the builder or with the builder and an \u003ccode\u003eIServiceProvider\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThis documentation is specifically for the latest version, \u003ccode\u003e1.0.0-alpha10\u003c/code\u003e, but it also provides a link to the \u003ccode\u003e1.0.0-alpha09\u003c/code\u003e version.\u003c/p\u003e\n"]]],[],null,["# AlloyDB v1alpha API - Class ServiceCollectionExtensions (1.0.0-alpha12)\n\nVersion latestkeyboard_arrow_down\n\n- [1.0.0-alpha12 (latest)](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [1.0.0-alpha11](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/1.0.0-alpha11/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the AlloyDB v1alpha 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.AlloyDb.V1Alpha/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.AlloyDb.V1Alpha.dll\n\nMethods\n-------\n\n### AddAlloyDBAdminClient(IServiceCollection, Action\\\u003cAlloyDBAdminClientBuilder\\\u003e)\n\n public static IServiceCollection AddAlloyDBAdminClient(this IServiceCollection services, Action\u003cAlloyDBAdminClientBuilder\u003e action = null)\n\nAdds a singleton [AlloyDBAdminClient](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AlloyDBAdminClient) to `services`.\n\n### AddAlloyDBAdminClient(IServiceCollection, Action\\\u003cIServiceProvider, AlloyDBAdminClientBuilder\\\u003e)\n\n public static IServiceCollection AddAlloyDBAdminClient(this IServiceCollection services, Action\u003cIServiceProvider, AlloyDBAdminClientBuilder\u003e action)\n\nAdds a singleton [AlloyDBAdminClient](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AlloyDBAdminClient) to `services`.\n\n### AddAlloyDBCSQLAdminClient(IServiceCollection, Action\\\u003cAlloyDBCSQLAdminClientBuilder\\\u003e)\n\n public static IServiceCollection AddAlloyDBCSQLAdminClient(this IServiceCollection services, Action\u003cAlloyDBCSQLAdminClientBuilder\u003e action = null)\n\nAdds a singleton [AlloyDBCSQLAdminClient](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AlloyDBCSQLAdminClient) to `services`.\n\n### AddAlloyDBCSQLAdminClient(IServiceCollection, Action\\\u003cIServiceProvider, AlloyDBCSQLAdminClientBuilder\\\u003e)\n\n public static IServiceCollection AddAlloyDBCSQLAdminClient(this IServiceCollection services, Action\u003cIServiceProvider, AlloyDBCSQLAdminClientBuilder\u003e action)\n\nAdds a singleton [AlloyDBCSQLAdminClient](/dotnet/docs/reference/Google.Cloud.AlloyDb.V1Alpha/latest/Google.Cloud.AlloyDb.V1Alpha.AlloyDBCSQLAdminClient) to `services`."]]