This is an automated email from the ASF dual-hosted git repository.
ptupitsyn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/ignite-3.git
The following commit(s) were added to refs/heads/main by this push:
new 4fc0a3a3723 IGNITE-27176 .NET: Document
IgniteServiceCollectionExtensions (#7082)
4fc0a3a3723 is described below
commit 4fc0a3a3723c705c548577a4feef38b9276c90ed
Author: Pavel Tupitsyn <[email protected]>
AuthorDate: Mon Dec 1 08:50:38 2025 +0200
IGNITE-27176 .NET: Document IgniteServiceCollectionExtensions (#7082)
---
docs/_docs/developers-guide/clients/dotnet.adoc | 25 +++++++++++++++++--------
1 file changed, 17 insertions(+), 8 deletions(-)
diff --git a/docs/_docs/developers-guide/clients/dotnet.adoc
b/docs/_docs/developers-guide/clients/dotnet.adoc
index d20b2072246..eb6a8a13861 100644
--- a/docs/_docs/developers-guide/clients/dotnet.adoc
+++ b/docs/_docs/developers-guide/clients/dotnet.adoc
@@ -101,25 +101,29 @@ public class Account
== Using Dependency Injection
-Ignite client provides support for using
link:https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection[Dependency
Injection] when initializing a client instance.
+Ignite client provides `IServiceCollection` extensions for using
link:https://learn.microsoft.com/en-us/dotnet/core/extensions/dependency-injection[Dependency
Injection].
This approach can be used to simplify initializing the client in DI containers:
- Register the `IgniteClientGroup` in your DI container:
+
-[source, cpp]
+[source, csharp]
----
-builder.Services.AddSingleton<IgniteClientGroup>(_ => new IgniteClientGroup(
- new IgniteClientGroupConfiguration
+IServiceCollection services = builder.Services;
+
+services.AddIgniteClientGroup(new IgniteClientGroupConfiguration
+{
+ ClientConfiguration = new IgniteClientConfiguration
{
- Size = 3,
- ClientConfiguration = new("localhost"),
- }));
+ Endpoints = { "localhost" }
+ },
+ Size = 2
+});
----
+
- Use an instance of the group you created in your methods:
+
-[source, cpp]
+[source, csharp]
----
public async Task<IActionResult> Index([FromServices] IgniteClientGroup
igniteGroup)
{
@@ -129,6 +133,11 @@ public async Task<IActionResult> Index([FromServices]
IgniteClientGroup igniteGr
}
----
+`IgniteClientGroup` is registered as a singleton by default and provides a
pool of cached Ignite client instances:
+
+* Ignite clients are thread-safe and can be shared between multiple consumers.
+* Client instances cache table and query metadata, which improves performance
for subsequent operations.
+
== SQL API
Ignite 3 is focused on SQL, and SQL API is the primary way to work with the
data. You can read more about supported SQL statements in the
link:sql-reference/ddl[SQL Reference] section. Here is how you can send SQL
requests: