Skip to content

Latest commit

 

History

History

NetCoreForce.Linq

This component is currently alpha/pre-release status

The goal is to provide a way to query Salesforce objects in a LINQ like way:

    var singleCase = await client
                    .Query<SfCase>()
                    .Select(c => new SfCase
                    {
                        Id = c.Id,
                        CaseNumber = c.CaseNumber,
                        SystemModstamp = c.SystemModstamp,
                        Account = new SfAccount
                        {
                            Name = c.Account.Name,
                            SystemModstamp = c.Account.SystemModstamp
                        },
                        Contact = new SfContact
                        {
                            Name = c.Contact.Name,
                            SystemModstamp = c.Contact.SystemModstamp
                        }
                    })
                    .FirstOrDefault();

Portions of this code came from the IQToolkit

NuGet Package: NetCoreForce.Linq