Softlab.Dynamics.QueryPaging 1.1.1

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

// Install Softlab.Dynamics.QueryPaging as a Cake Tool
#tool nuget:?package=Softlab.Dynamics.QueryPaging&version=1.1.1

Example

QueryExpression queryAccount= new QueryExpression("account");
queryAccount.ColumnSet = new ColumnSet("accountid", "fullname");
QueryPaging query = new QueryPaging(service, queryAccount, 800, true, false);

for (Entity account = query.retrieveNext(); account != null; account= query.retrieveNext())
{
            Entity newRecord= new Entity("mycustomentity");
            newRecord["fullname"] = account["fullname"];
            CreateRequest createRequest = new CreateRequest { Target = newRecord };
            query.execute(createRequest);
}

Constructors:

QueryPaging query = new QueryPaging(service, queryExpression, 5000); //only queryExpression
QueryPaging query = new QueryPaging(service, queryExpression, 5000, continueOnError, returnResponses); //queryExpression + executeMultipleRequest, same size
QueryPaging query = new QueryPaging(service, queryExpression, 5000, continueOnError, returnResponses, 1000); //queryExpression + executeMultipleRequest, different size

Methods:

Entity retrieveNext() //retrieve the next entity. Returns null when there are no more records
ExecuteMultipleResponse execute(OrganizationRequest request) //add the request to the queue and execute the ExecuteMultipleRequest when full. If the queue is not yet full returns null

Fields (advanced, not need for most cases):

EntityCollection entities //internal EntityCollection object returned by retrieveMultiple. Is reset each time a new batch is retrieved
ExecuteMultipleRequest executeMultipleRequest //internal ExecuteMultipleRequest that collects the requests. Its requests property is reset each time the request is executed. Is null if the library is initalized without ExecuteMultipleRequest params
Product Compatible and additional computed target framework versions.
.NET Framework net452 is compatible.  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.1.1 614 6/20/2019
1.1.0 459 6/20/2019
1.0.2 460 6/20/2019
1.0.1 475 6/20/2019
1.0.0 481 6/20/2019

First release