EC.DynamicsClient 5.2.2

There is a newer version of this package available.
See the version list below for details.
dotnet add package EC.DynamicsClient --version 5.2.2
                    
NuGet\Install-Package EC.DynamicsClient -Version 5.2.2
                    
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="EC.DynamicsClient" Version="5.2.2" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="EC.DynamicsClient" Version="5.2.2" />
                    
Directory.Packages.props
<PackageReference Include="EC.DynamicsClient" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add EC.DynamicsClient --version 5.2.2
                    
#r "nuget: EC.DynamicsClient, 5.2.2"
                    
#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.
#:package EC.DynamicsClient@5.2.2
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=EC.DynamicsClient&version=5.2.2
                    
Install as a Cake Addin
#tool nuget:?package=EC.DynamicsClient&version=5.2.2
                    
Install as a Cake Tool

Introduction

This library Dynamics Client wraps calls to Dynamics 365 so you can use this to extend Dynamics 365.

Getting Started using Code Samples

namespace EC.DynamicsClient.CodeSamples;

using EC.DynamicsClient;
using Microsoft.Extensions.DependencyInjection;
using System;
using System.Threading.Tasks;

public class DynamicsClientCodeSamples
{
    public async Task Default_Dynamics_Client_Initialization_and_Usage()
    {
        // Setup/Startup
        var serviceProvider = new ServiceCollection()
            .AddDynamicsClients()
            .BuildServiceProvider();

        // Query
        var dynamicsQueryClient = serviceProvider
            .GetService<IDynamicsQueryClient>()
            .ThrowIfNull();
        try
        {
            var entityCollection = await dynamicsQueryClient
                .GetCollectionAsync<Contact>(Contact.EntitySetName.Query().Build())
                .ConfigureAwait(false);

            if (entityCollection?.Entities is not null)
            {
                foreach (var item in entityCollection.Entities)
                {

                }
            }
        }
        catch (FailedStatusCodeException exception)
        {
            var dynamicsError = await exception.Response.GetError().ConfigureAwait(false);
        }

        // Create new record
        var dynamicsManagerClient = serviceProvider
            .GetService<IDynamicsManagerClient>()
            .ThrowIfNull();

        var createResponse = await dynamicsManagerClient
            .CreateAsync(new CreateRequest<Contact>(Contact.EntitySetName, new()
            {
                FirstName = "test first name",
                LastName = "test last name",
            }, headerSet: new HeaderSet(new AddPrefer(new ReturnRepresentation())))).ConfigureAwait(false);
        if (createResponse.IsSuccessStatusCode is false)
        {
            var dynamicsError = await createResponse.GetError().ConfigureAwait(false);
        }

        var created_contact = await createResponse.GetData().ConfigureAwait(false);
    }
}

// Dynamics Models/Records
class Contact
{
    public const string EntitySetName = "contacs";

    public Guid? ContactId { get; set; }
    public string FirstName { get; set; }
    public string LastName { get; set; }
}

Contribute

To Contribute, clone repository locally then create a new branch from master/main and make any changes on that branch. When happy with changes create pull request for review.

Product Compatible and additional computed target framework versions.
.NET net5.0 was computed.  net5.0-windows was computed.  net6.0 was computed.  net6.0-android was computed.  net6.0-ios was computed.  net6.0-maccatalyst was computed.  net6.0-macos was computed.  net6.0-tvos was computed.  net6.0-windows was computed.  net7.0 was computed.  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 was computed.  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.  net9.0 was computed.  net9.0-android was computed.  net9.0-browser was computed.  net9.0-ios was computed.  net9.0-maccatalyst was computed.  net9.0-macos was computed.  net9.0-tvos was computed.  net9.0-windows was computed.  net10.0 was computed.  net10.0-android was computed.  net10.0-browser was computed.  net10.0-ios was computed.  net10.0-maccatalyst was computed.  net10.0-macos was computed.  net10.0-tvos was computed.  net10.0-windows was computed. 
.NET Core netcoreapp3.0 was computed.  netcoreapp3.1 was computed. 
.NET Standard netstandard2.1 is compatible. 
MonoAndroid monoandroid was computed. 
MonoMac monomac was computed. 
MonoTouch monotouch was computed. 
Tizen tizen60 was computed. 
Xamarin.iOS xamarinios was computed. 
Xamarin.Mac xamarinmac was computed. 
Xamarin.TVOS xamarintvos was computed. 
Xamarin.WatchOS xamarinwatchos 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
5.7.0 303 12/9/2024
5.6.3 119 11/26/2024
5.6.1 106 11/19/2024
5.6.0 122 11/11/2024
5.5.0 261 10/14/2024
5.4.0 269 9/20/2024
5.3.2 127 8/30/2024
5.3.1 403 5/13/2024
5.2.4 902 4/9/2024
5.2.3 142 3/24/2024
5.2.2 121 3/24/2024
5.1.3 442 3/19/2024
5.1.2 177 3/9/2024
5.1.1 158 3/7/2024
5.0.4 161 3/3/2024
4.4.1 505 11/22/2023
4.3.1 157 11/22/2023
4.2.3 334 8/16/2023
4.2.2 690 8/13/2023
4.2.1 269 7/23/2023
4.1.4 251 7/21/2023
4.1.3 235 7/20/2023
4.1.2 241 7/16/2023
4.1.1 243 7/12/2023
4.1.0 258 7/6/2023
4.0.0 223 6/26/2023
3.14.1 283 6/17/2023
3.13.1 236 5/25/2023
3.12.5 344 3/18/2023
3.12.4 326 3/14/2023
3.12.3 327 3/13/2023
3.12.2 347 3/9/2023
3.12.1 1,242 11/12/2022
3.12.0 458 11/12/2022
3.11.0 479 11/10/2022
3.10.0 539 10/22/2022
3.9.0 503 10/17/2022
3.8.0 2,453 8/16/2021
3.7.6 529 8/2/2021
3.7.5 498 8/2/2021
3.7.4 959 6/30/2021
3.7.3 501 6/30/2021
3.7.1 979 6/19/2021
3.4.1 549 5/31/2021
3.4.0 500 4/14/2021
3.3.1 549 4/1/2021
3.3.0 536 3/19/2021
3.2.2 615 2/17/2021
3.2.1 494 2/17/2021
3.2.0 485 2/14/2021
3.1.0 470 2/14/2021
3.0.1.5 517 2/11/2021
2.2.1 602 3/4/2022