Skip to content
This repository has been archived by the owner on Aug 18, 2020. It is now read-only.

Query archive providers

Matthijs Wagemakers edited this page Jan 11, 2018 · 2 revisions

SuperLinq will query the dynamic archive provider by default but this can be overridden so you can specify all archive providers supported by NetServer, found here.

Example

Let's say you want to query a selection of persons using the ContactSelection Archive Provider. It would just take a simple custom class that implements the IModel interface and specifies one or more of the supported columns:

[TableInfo]
public class ContactSelectionMember : IModel
{
    [ColumnInfo("selectionId")]
    public int SelectionId { get; set; }

    [ColumnInfo("contactId")]
    public int ContactId { get; set; }

    [ColumnInfo("personId")]
    public int PersonId { get; set; }

    [ColumnInfo("name")]
    public string CompanyName { get; set; }

    [ColumnInfo("firstName")]
    public string FirstName { get; set; }

    [ColumnInfo("lastName")]
    public string LastName { get; set; }
}

A new Queryable instance can then be created by supplying the name of the archive provider ContactSelection:

List<ContactSelectionMember> members = new Queryable<ContactSelectionMember>("ContactSelection")
    .Where(where => where.SelectionId == 488)
    .ToList();
Clone this wiki locally