![]() |
VOOZH | about |
This article illustrates using LINQ to access tables within the Anaplan via the CData ADO.NET Data Provider for Anaplan. To achieve this, we will use LINQ to Entity Framework, which facilitates the generation of connections and can be seamlessly employed with any CData ADO.NET Data Providers to access data through LINQ.
See the help documentation for a guide to setting up an EF 6 project to use the provider.
Enter your data source connection information.
The driver supports authenticating with Basic, Certificate, or OAuth. In every case, set Region to the region where your Anaplan account data is hosted (e.g., , which is the default).
Set AuthScheme to , then supply your Anaplan User and Password. If your workspace uses single sign-on (SSO), you must be assigned as an Exception User to use Basic authentication.
Set AuthScheme to , then supply the Certificate, CertificateType, and PrivateKey properties (and the matching CertificatePassword / PrivateKeyPassword if either is encrypted). The certificate must be a CA-issued X.509 certificate registered with your Anaplan tenant administrator.
Register a custom OAuth application in Anaplan, then set the following properties:
See the Getting Started chapter of the help documentation for a guide to creating a custom OAuth app and using OAuth.
Below is a typical connection string:
OAuthClientId=your_client_id;OAuthClientSecret=your_client_secret;CallbackURL=your_callback_url;Region=US1;InitiateOAuth=GETANDREFRESH;
Using the entity you created, you can now perform select commands. For example:
AnaplanEntities context = new AnaplanEntities();
var salesQuery = from sales in context.Sales
select sales;
foreach (var result in salesQuery) {
Console.WriteLine("{0} {1} ", result.Id, result.Region);
}
See "LINQ and Entity Framework" chapter in the help documentation for example queries of the supported LINQ.
Download a free trial of the Anaplan Data Provider to get started:
Download NowLearn more:
👁 Anaplan IconRapidly create and deploy powerful .NET applications that integrate with Anaplan.