[[["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 latest version of the \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e for the Firestore v1 API is 3.10.0, with documentation also available for versions back to 2.3.0.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eServiceCollectionExtensions\u003c/code\u003e class provides extension methods to configure API clients within the \u003ccode\u003eMicrosoft.Extensions.DependencyInjection\u003c/code\u003e namespace.\u003c/p\u003e\n"],["\u003cp\u003eThis class includes two primary methods: \u003ccode\u003eAddFirestoreClient\u003c/code\u003e which adds a singleton \u003ccode\u003eFirestoreClient\u003c/code\u003e to the specified \u003ccode\u003eIServiceCollection\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eAddFirestoreClient\u003c/code\u003e method has two overloads, one taking an \u003ccode\u003eAction<FirestoreClientBuilder>\u003c/code\u003e and the other taking an \u003ccode\u003eAction<IServiceProvider, FirestoreClientBuilder>\u003c/code\u003e allowing for varied configuration options.\u003c/p\u003e\n"]]],[],null,["# Firestore v1 API - Class ServiceCollectionExtensions (3.10.0)\n\nVersion latestkeyboard_arrow_down\n\n- [3.10.0 (latest)](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.9.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.9.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.8.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.8.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.7.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.7.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.6.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.6.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.5.1](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.5.1/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.4.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.2.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.2.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.1.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.1.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [3.0.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/3.0.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.5.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.5.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.4.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.4.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions)\n- [2.3.0](/dotnet/docs/reference/Google.Cloud.Firestore.V1/2.3.0/Microsoft.Extensions.DependencyInjection.ServiceCollectionExtensions) \n\n public static class ServiceCollectionExtensions\n\nReference documentation and code samples for the Firestore 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.Firestore.V1/latest/Microsoft.Extensions.DependencyInjection)\n\nAssembly\n--------\n\nGoogle.Cloud.Firestore.V1.dll\n\nMethods\n-------\n\n### AddFirestoreClient(IServiceCollection, Action\\\u003cFirestoreClientBuilder\\\u003e)\n\n public static IServiceCollection AddFirestoreClient(this IServiceCollection services, Action\u003cFirestoreClientBuilder\u003e action = null)\n\nAdds a singleton [FirestoreClient](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.FirestoreClient) to `services`.\n\n### AddFirestoreClient(IServiceCollection, Action\\\u003cIServiceProvider, FirestoreClientBuilder\\\u003e)\n\n public static IServiceCollection AddFirestoreClient(this IServiceCollection services, Action\u003cIServiceProvider, FirestoreClientBuilder\u003e action)\n\nAdds a singleton [FirestoreClient](/dotnet/docs/reference/Google.Cloud.Firestore.V1/latest/Google.Cloud.Firestore.V1.FirestoreClient) to `services`."]]