[[["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-07 UTC."],[[["\u003cp\u003eThe latest version of the Google Cloud Datastore v1 API for .NET is 4.15.0, with documentation available.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class provides extension methods to configure API clients, specifically for \u003ccode\u003eDatastoreClient\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddDatastoreClient\u003c/code\u003e method can be used to add a singleton \u003ccode\u003eDatastoreClient\u003c/code\u003e to an \u003ccode\u003eIServiceCollection\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThere are two overloads of the \u003ccode\u003eAddDatastoreClient\u003c/code\u003e method, one taking an \u003ccode\u003eAction<DatastoreClientBuilder>\u003c/code\u003e and another taking an \u003ccode\u003eAction<IServiceProvider, DatastoreClientBuilder>\u003c/code\u003e for configuration.\u003c/p\u003e\n"],["\u003cp\u003eThis class is part of the \u003ccode\u003eMicrosoft.Extensions.DependencyInjection\u003c/code\u003e namespace and is located in the \u003ccode\u003eGoogle.Cloud.Datastore.V1.dll\u003c/code\u003e assembly, offering a variety of versions from 3.2.0 up to 4.15.0.\u003c/p\u003e\n"]]],[],null,["# Google Cloud Datastore v1 API - Class ServiceCollectionExtensions (4.15.0)\n\nVersion latestkeyboard_arrow_down\n\n- [4.15.0 (latest)](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.14.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.14.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.13.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.13.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.12.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.12.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.11.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.11.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.10.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.10.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.9.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.9.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.8.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.8.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.7.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.7.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.6.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.6.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.5.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.4.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.1.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [4.0.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/4.0.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.5.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.5.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.4.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Datastore.V1/3.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Google Cloud Datastore 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.Datastore.V1/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.Datastore.V1.dll\n\nMethods\n-------\n\n### AddDatastoreClient(IServiceCollection, Action\\\u003cDatastoreClientBuilder\\\u003e)\n\n public static IServiceCollection AddDatastoreClient(this IServiceCollection services, Action\u003cDatastoreClientBuilder\u003e action = null)\n\nAdds a singleton [DatastoreClient](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.DatastoreClient) to `services`.\n\n### AddDatastoreClient(IServiceCollection, Action\\\u003cIServiceProvider, DatastoreClientBuilder\\\u003e)\n\n public static IServiceCollection AddDatastoreClient(this IServiceCollection services, Action\u003cIServiceProvider, DatastoreClientBuilder\u003e action)\n\nAdds a singleton [DatastoreClient](/dotnet/docs/reference/Google.Cloud.Datastore.V1/latest/Google.Cloud.Datastore.V1.DatastoreClient) to `services`."]]