Fic.Dataverse.MultiplexingServiceClient 1.0.1

dotnet add package Fic.Dataverse.MultiplexingServiceClient --version 1.0.1                
NuGet\Install-Package Fic.Dataverse.MultiplexingServiceClient -Version 1.0.1                
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="Fic.Dataverse.MultiplexingServiceClient" Version="1.0.1" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Fic.Dataverse.MultiplexingServiceClient --version 1.0.1                
#r "nuget: Fic.Dataverse.MultiplexingServiceClient, 1.0.1"                
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install Fic.Dataverse.MultiplexingServiceClient as a Cake Addin
#addin nuget:?package=Fic.Dataverse.MultiplexingServiceClient&version=1.0.1

// Install Fic.Dataverse.MultiplexingServiceClient as a Cake Tool
#tool nuget:?package=Fic.Dataverse.MultiplexingServiceClient&version=1.0.1                

🚀 MultiplexingServiceClient

The MultiplexingServiceClient library is designed to handle multiple connections to a Dataverse environment efficiently. It provides functionalities to execute various types of requests using multiple threads and batches, optimizing the connections for better performance.

✨ Key Features

🔧 Connection Optimization

Automatically optimizes connection settings such as DefaultConnectionLimit, ThreadPool, and ServicePointManager properties.

âš¡ Parallel Request Execution

Executes multiple requests in parallel using Parallel.ForEach, supporting ExecuteMultipleRequest, UpdateMultipleRequest, and CreateMultipleRequest.

🔄 Connection Management

Manages ServiceClient instances and provides methods to clone and retrieve service clients.

📦 Installation

To install the MultiplexingServiceClient library, add the following NuGet package to your project:

dotnet add package MultiplexingServiceClient

or

Use the NuGet Package Manager in Visual Studio:

  1. Right-click on your project in Solution Explorer and select "Manage NuGet Packages".
  2. Search for MultiplexingServiceClient.
  3. Click "Install" to add the package to your project.

🚀 How to Use

Initialize the Client

To initialize the MultiplexingServiceClient, provide a list of connection strings for your Dataverse environments:

var connectionStrings = new List<string>
{
    "your-connection-string-1",
    "your-connection-string-2"
};

var client = new MultiplexingServiceClient(connectionStrings);

Create Multiple Request

To execute a CreateMultipleRequest using the MultiplexingServiceClient, follow these steps:

var connectionStrings = new List<string>
{
    "your-connection-string-1",
    "your-connection-string-2"
};

var client = new MultiplexingServiceClient(connectionStrings);

var createRequest = new CreateMultipleRequest
{
    Targets = new EntityCollection(new List<Entity>
    {
        new Entity("account") { ["name"] = "Account 1" },
        new Entity("account") { ["name"] = "Account 2" }
    })
};

client.Execute(createRequest, numberOfThreads: 10, batchSize: 2);

License

This project is licensed under the MIT License. See the LICENSE file for details.

Donations

If you find this tool useful and would like to support its development, you can buy me a coffee!

"Buy Me A Coffee"

Your support is greatly appreciated!

Product Compatible and additional computed target framework versions.
.NET net7.0 is compatible.  net7.0-android was computed.  net7.0-ios was computed.  net7.0-maccatalyst was computed.  net7.0-macos was computed.  net7.0-tvos was computed.  net7.0-windows was computed.  net8.0 is compatible.  net8.0-android was computed.  net8.0-browser was computed.  net8.0-ios was computed.  net8.0-maccatalyst was computed.  net8.0-macos was computed.  net8.0-tvos was computed.  net8.0-windows was computed. 
.NET Framework net462 is compatible.  net463 was computed.  net47 was computed.  net471 was computed.  net472 is compatible.  net48 was computed.  net481 was computed. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

NuGet packages

This package is not used by any NuGet packages.

GitHub repositories

This package is not used by any popular GitHub repositories.

Version Downloads Last updated
1.0.1 68 11/25/2024

1.0.0
- Initial version of the library