FluentCRM 9.0.0

There is a newer version of this package available.
See the version list below for details.
dotnet add package FluentCRM --version 9.0.0
NuGet\Install-Package FluentCRM -Version 9.0.0
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="FluentCRM" Version="9.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FluentCRM --version 9.0.0
#r "nuget: FluentCRM, 9.0.0"
#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 FluentCRM as a Cake Addin
#addin nuget:?package=FluentCRM&version=9.0.0

// Install FluentCRM as a Cake Tool
#tool nuget:?package=FluentCRM&version=9.0.0

FluentCRM

This project provides a Fluent-style interface to Microsoft Dynamics CRM using the Microsoft.Xrm.Sdk web interface.

This project arose from the frustrations of writing code that worked with the existing SDK interface and then dealing with various issues that arose from this: -

  1. A programming model where we have to specify the names of the attributes we want to retrieve, and then having to check that they have actually been retrieved (and are not null) and dealing with the issues and potential errors around this.
    Having to specify the attribute name in one or more places means we have the same information in multiple places, leading to mismatches and errors. On top of this all of the boilerplate code around retrieving attributes and then checking for null is very standard (but frustratingly error prone) The aim was to elimitate this code, so removing a common soure of error in CRM programming.

  2. The issues around what I call "phantom" updates to CRM attributes, where a poorly written client updates an attribute with its existing value and writes it back to the CRM server.
    This raises issues with clutter in the audit log, but more importantly can lead to workflows and plugins running even when there has been no change to an attribute. (Plugins and worflows run on "update" to an attribute, which does not necessarily mean that the attribute has"changed". A subtle point that is not always understood by every CRM developer 😎 )

  3. Writing for the CRM SDK interface produces very "noisy" code with a lot of fairly standard yet error prone boilerplate. So another aim was to take advantage generics and a Fluent-style interface to produce code that elimitates all of this excess code and produces something that is easy to write and, just as important, easy to read.

  4. I wanted to try to discourage what I call the "retrieve of death" where a developer gives up trying to track which attributes they actually need and just pulls all the columns back - just in case they have forgotten to include a field they might need.
    On large entities this can mean literally hundreds of attributes being read unnecessarily, with a predictable effect on your CRM server.

  5. I wanted to design a library that could be easily extended to cover the multiple different custom entity types found in a CRM installation.

  6. Another problem I was trying to address: have you ever been asked to return a phone number from CRM, and the requirement says use the work number, or if that is missing use the mobile number. Oh and lets throw in the home number just in case the first two are missing? I had that problem, so FluentCRM can help there too.

  7. Then I started thinking about how to do joins...

A taste of Fluent: -

FluentContact.Contact(contact.Id,  orgService)
          .UseAttribute( (string e) => myStruct.emailAddress = e, "emailaddress1")
          .Execute();
Product Compatible and additional computed target framework versions.
.NET Framework net is compatible. 
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
9.1.34 271 5/30/2023
9.1.33 119 5/25/2023
9.1.32 240 4/3/2023
9.1.31 215 4/3/2023
9.1.30 203 3/30/2023
9.1.29 460 2/15/2023
9.1.28 295 1/20/2023
9.1.27 488 11/22/2022
9.1.26 371 10/19/2022
9.1.25 353 10/18/2022
9.1.24 449 8/17/2021
9.1.23 810 4/16/2021
9.1.22 332 4/15/2021
9.1.21 395 4/15/2021
9.1.20 379 4/1/2021
9.1.19 406 3/9/2021
9.1.18 595 11/16/2020
9.1.17 381 11/16/2020
9.1.16 467 11/12/2020
9.1.15 372 11/12/2020
9.1.14 588 6/8/2020
9.1.13 455 5/1/2020
9.1.12 535 5/1/2020
9.1.11 515 4/16/2020
9.1.10 585 2/19/2020
9.1.9 466 2/18/2020
9.1.8 500 2/14/2020
9.1.7 635 1/28/2020
9.1.6 616 11/21/2019
9.1.5 635 9/9/2019
9.1.4 542 7/29/2019
9.1.2 550 7/1/2019
9.1.0 618 4/18/2019
9.0.3 612 4/8/2019
9.0.1 607 3/27/2019
9.0.0 639 3/19/2019

Initial Release