Skip to main content Skip to footer

Introducing ComponentOne DataConnectors

What are DataConnectors?

ComponentOne DataConnectors is a new data connectivity library for performing any data operation, such as SQL queries and batch updates, against a variety of popular data sources. The data connectors connect to online sources that expose data through OData or REST-based APIs using popular data access technologies such as ADO.NET & Entity Framework Core.

Introducing ComponentOne DataConnectors

Why Use DataConnectors?

DataConnectors enables you to create data-oriented apps faster, as it allows you to import and analyze data from different sources using a standard interface. It hides the complexity associated with connecting to a variety of different data sources behind a single unified interface for performing common operations, such as queries and updates.

With DataConnectors you can integrate data from different sources and bring it together seamlessly into your own custom application without relying on additional software. This empowers end-users to manage data more efficiently within a single application and, ultimately, gain better insights.

DataConnectors provides fast and direct access to a variety of data sources. Supported sources in the first version include OData & Dynamics 365 Sales.

Why Use DataConnectors

In the future, we plan to expand this support to SalesForce, QuickBooks, Kintone, Dynamics 365 Finance & Business as well.

And finally, the DataConnectors library itself is a .NET Standard Library, which means it can be used across practically any .NET platform: WinForms, WPF, ASP.NET Core, UWP, Xamarin, or pure .NET Core console apps. It's built against .NET Standard from the ground up, so it's supported across Windows, Mac, Linux, and mobile device platforms.

To see DataConnectors for Dynamics 365 in action, check out this live demo.

DataConnectors Features

DataConnectors provide essential data access features such as CRUD operations (create, read, update, delete) and authentication. Other features include SQL query support, LINQ support, and caching.

SQL Queries

Query against the data source using standard SQL syntax. The data connectors support most SQL functionality, including joins queries, functions, and summaries.

string sql = "SELECT \"o.OrderDetails\".\"OrderID", \"o.OrderDetails\".\"ProductID\", \"o.OrderDetails\".\"Discount\"," +
             "FROM \"Order_Details\" AS \"o.OrderDetails\"" +
             "INNER JOIN(" +
                 "SELECT DISTINCT \"o0\".\"OrderID\"" +
                 "FROM \"Orders\" AS \"o0\"" +
                 "LEFT JOIN \"Customers\" AS \"o.Customer0\" ON \"o0\".\"CustomerID\" = \"o.Customer0\".\"CustomerID\"" +
             ") AS \"t\" ON \"o.OrderDetails\".\"OrderID\" = \"t\".\"OrderID\"" +
             "ORDER BY \"t\".\"OrderID\"";
using (var connection = new C1ODataConnection(NorthwindSampleConnectionString))
{
    connection.Open();
    var cmd = connection.CreateCommand();
    cmd.CommandText = sql;


    var reader = cmd.ExecuteReader();
    Task.Run(async() => await PrintStringContentFromReader(reader)).GetAwaiter().GetResults();
}

CRUD Operations

In addition to querying, the data connectors support other CRUD operations such as insertion, updating, and deleting data.

using (var connection = new C1ODataConnection(GCODataServerConnectionString))
{
    connection.Open();


    string sqlInsert = @"Insert into Accounts(Name,Email) values(@P2,@P3)";
    var cmdInsert = connection.CreateCommand();
    cmdInsert.CommandText = sqlInsert;


    DbParameter parameter2 = cmdInsert.CreateParameter();
    parameter2.ParameterName = "P2";
    parameter2.Value = "Anthony";
    parameter2.DbType = DbType.String;
    cmdInsert.Parameters.Add(parameter2);


    DbParameter parameter3 = cmdInsert.CreateParameter();
    parameter3.ParameterName = "P3";
    parameter3.Value = "anthony.s@testmail.com";
    parameter3.DbType = DbType.String;
    cmdInsert.Parameters.Add(parameter3);


    var result = cmdInsert.ExecuteNonQuery();
}

OpenAuth Authentication

The data connectors support OpenAuth-based authentication to help you protect your data through a secure connection.

// Password credential
string connstr = $@"Url={urlDynamics};Use Etag=true;OAuthClientId={clientID};Username={username};Password=";


using (var con = new C1D365SConnection(connstr))
{
    con.Open();
    var cmd = con.CreateCommand();
    cmd.CommandText = "Select * FROM quotes where totalamount > 100000";


    var reader = cmd.ExecuteReaderAsync().GetAwaiter().GetResult();
    Task.Run(async () => await PrintStringContentFromReader(reader)).GetAwaiter().GetResult();
}

Fast, Local Caching

The data connector has in-built caching to support local availability of data for faster performance on repeat operations. You can set cache settings in connection object to configure the cache database.

C1D365SConnectionStringBuilder connBuilder = new C1D365SConnectionStringBuilder
{
    UseCache = true,
    CacheTolerance = 600, //in seconds
    CacheLocation = @"E:\temp\c1cache.db",
    Url = "D365SServer",
    Username = "c1admin",
    Password = "password"
};

What Can be Done With DataConnectors?

While the data connectors focus primarily on the connecting and querying, you can use them alongside other robust .NET Standard and .NET Framework components to do a lot more.

DataConnectors are more powerful when used with other ComponentOne components, such as DataEngine and FlexPivot.

For example:

  • Integrate data with C1DataCollection to provide filtering, grouping, data virtualization to your data-aware controls.
  • Import data from Dynamics 365 to C1DataEngine to analyze massive amounts of data in fractions of a second.
  • Connect to pivot grids & charts, such as FlexPivot, to visually analyze data from any supported source.
  • Create business reports using FlexReport and data from Dynamics or any OData source for essential business tasks.
  • Display data in a .NET FlexGrid control in desktop, web, or mobile devices.

DataConnectors Conclusion

The DataConnectors provide a familiar interface for accessing popular data services, including Dynamics365, SalesForce, Google Analytics, and QuickBooks Online. The most significant value with the connectors is in the way they can be used in conjunction with our other unique offering, Data Engine, to get high-performance in-memory data caching & analysis.

With Data Engine and Data Connectors, you'll be able to connect to and merge data from disparate data sources, perform fast data analysis in memory, and query against millions of records in seconds.

To see DataConnectors in action, check out this live demo connecting to Microsoft Dynamics 365.

ComponentOne Product Manager Greg Lutz

Greg Lutz

comments powered by Disqus