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
<PackageReference Include="Akzin.Crm.Linq" Version="1.0.10" />
paket add Akzin.Crm.Linq --version 1.0.10
#r "nuget: Akzin.Crm.Linq, 1.0.10"
// 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 | Versions 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. |
-
- Microsoft.CrmSdk.CoreAssemblies (>= 7.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Fix for using RowVersion in an anonymous object projection