posts - 51 , comments - 2 , trackbacks - 0

Working with QuickBooks using LINQPad

The CData ADO.NET Providers can be used from many applications and development environments. This article shows how to use LINQPad to connect to QuickBooks using the CData ADO.NET Provider for QuickBooks. Although this example uses the QuickBooks Data Provider, the same process applies to any CData ADO.NET Providers.

Create the Data Model

  1. In a new console project in Visual Studio, create a data model using the ADO.NET Entity Data Model wizard.
  2. Select an existing connection or click New Connection to specify a new one.

  3. Select the desired tables and views and click Finish to create the data model.
  4. Right-click on the entity diagram and select 'Add Code Generation Item'. Next, select the ADO.NET DbContext Generator.
  5. Build the project. The generated files can be used to create a QuickBooks connection in LINQPad.

Connect to QuickBooks in LINQPad

After you have obtained the required connection properties and created the data model assembly, follow the steps below to start using the model in LINQPad.

  1. Open LINQPad and click 'Add New Connection'.
  2. Select 'Entity Framework DbContext POCO'.
  3. On the next page, enter the following information.

    • Path to Custom Assembly: Enter the path to the data model assembly created by Visual Studio.
    • Full Type Name of Typed DbContext: Enter the name of the custom DbContext.
    • Name for this connection: Enter a name for the connection.
  4. You can now query data through LINQPad. For examples of the supported LINQ queries, see the "LINQ and Entity Framework" chapter in the help documentation.

Print | posted on Tuesday, November 27, 2012 8:36 AM | Filed Under [ quickbooks cdata linqpad ]


No comments posted yet.
Post A Comment

Powered by: