Akzin.Crm.Linq 1.0.10

dotnet add package Akzin.Crm.Linq --version 1.0.10
NuGet\Install-Package Akzin.Crm.Linq -Version 1.0.10
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="Akzin.Crm.Linq" Version="1.0.10" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Akzin.Crm.Linq --version 1.0.10
#r "nuget: Akzin.Crm.Linq, 1.0.10"
#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 Akzin.Crm.Linq as a Cake Addin
#addin nuget:?package=Akzin.Crm.Linq&version=1.0.10

// Install Akzin.Crm.Linq as a Cake Tool
#tool nuget:?package=Akzin.Crm.Linq&version=1.0.10

Akzin.Crm.Linq is an improved Linq provider for Microsoft CRM, with many additional features over the Microsoft CRM SDK's Linq Provider.

Quick Start

using Akzin.Crm.Linq;

IOrganizationService crm = CreateCrmContext();

var q = from c in crm.Query<Contact>()
    join acc in crm.Query<Account>() on c.ParentCustomerId.Id equals acc.AccountId
    where acc.Name == "Akzin.com"
    select new { a = acc, c };

var listOfAccountsAndContacts = q.ToList();

Supported features (infinite list)

  • Early-bound and late-bound support
  • Outer left joins (SDK Linq goes only one level deep)
  • Count
  • Paging
  • Returns more than 5000 records
  • ...

Examples

Filter on Enum equivalents of OptionSetValue

from a in crm.Query<Account>()
where a.StatusCodeEnum == AccountStatuscode.Active
select a;

Return Enum values in anonymous types

from a in crm.Query<Account>()
select new { a.Name, a.StatusCodeEnum };

Join two tables and return the second one

from c in crm.Query<Contact>()
join acc in crm.Query<Account>() on c.ParentCustomerId.Id equals acc.AccountId
select acc;

Use Any

var q = from c in crm.Query<Contact>()
    where a.StatusCodeEnum == AccountStatuscode.Active
    select acc;

var any = q.Any();

...

Feature Request and Contribution

Feature Requests should be posted on GitHub (of email: to@fik.email). When requesting a feature, try to provide example code.

You could also checkout the code and implement the feature yourself. Your contribution using pull requests, is much appreciated.

License

The Akzin.Crm.Linq project is licensed under the Apache Software License 2.0.

Product Compatible and additional computed target framework versions.
.NET Framework net45 is compatible.  net451 was computed.  net452 was computed.  net46 was computed.  net461 was computed.  net462 was computed.  net463 was computed.  net47 was computed.  net471 was computed.  net472 was computed.  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.10 4,772 3/20/2018
1.0.9 1,250 3/6/2018
1.0.8 920 2/18/2018
1.0.7 966 2/10/2018
1.0.6 951 2/9/2018
1.0.5 934 2/8/2018
1.0.4 1,105 2/6/2018
1.0.3 1,120 2/5/2018
1.0.1 884 2/4/2018

Fix for using RowVersion in an anonymous object projection