The Department of Labor Developer Community

.Net DOL Data SDK Sample

Table of contents

Overview

This sample will provide the steps to create a simple Dot Net web application that can consume DOL Data or DOL Service Operation (Beta Version). Following these steps in order will allow your application to operate correctly.

Implementing the DOL Data Request

Include Using statements to reference the appropriate classes.

using System.Data.Services.Client;
using gov.dol.doldata.util;
using ServiceReference1;

Create and instance of the FormsEntity using the Dataset Location path found for the feed referenced by your Service Reference.
Wire the DOLDataUtil.service_SendingRequest static method to the entity.SendingRequest event handler.

Configure Security

Once the SDK has been added to the project, we will need to modify both the ApiKey and the SharedSecret members of this class to access DOL Data.
Edit the DOLDataUtil class within the DOLDataUtil.cs file.

The ApiKey corresponds to the Token identifier in your token list.

The SharedSecret created during setup is the same value that is used in the DOLDataUtil class.

*Note: DOLDataUtil Class may be inaccessable due to its current access specifier. Precede with public keyword to resolve this problem.