![]() |
VOOZH | about |
This article illustrates using LINQ to access tables within the Jira Service Management via the CData ADO.NET Data Provider for Jira Service Management. 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.
You can establish a connection to any Jira Service Desk Cloud account or Server instance.
To connect to a Cloud account, you'll first need to retrieve an APIToken. To generate one, log in to your Atlassian account and navigate to API tokens > Create API token. The generated token will be displayed.
Supply the following to connect to data:
To authenticate with a service account, supply the following connection properties:
Note: Password has been deprecated for connecting to a Cloud Account and is now used only to connect to a Server Instance.
By default, the connector only surfaces system fields. To access the custom fields for Issues, set IncludeCustomFields.
Below is a typical connection string:
ApiKey=myApiKey;User=MyUser;InitiateOAuth=GETANDREFRESH;
Using the entity you created, you can now perform select , update, delete, and insert commands. For example:
JiraServiceDeskEntities context = new JiraServiceDeskEntities();
var requestsQuery = from requests in context.Requests
select requests;
foreach (var result in requestsQuery) {
Console.WriteLine("{0} {1} ", result.Id, result.RequestId);
}
See "LINQ and Entity Framework" chapter in the help documentation for example queries of the supported LINQ.
Download a free trial of the Jira Service Management Data Provider to get started:
Download NowLearn more:
👁 Jira Service Management IconRapidly create and deploy powerful .NET applications that integrate with Jira Service Management.