ADO.NET is a mechanism that provides consistent access to various data sources. You may already be familiar with the standard SQL server ADO provider supplied by Microsoft which makes it easy to connect to and retrieve data from a SQL database, and other software vendors may provide ADO.NET adapters for their own technologies.
As an alternative to the SmartObject Client APIs and Services, K2 also provides an ADO.NET-compatible provider which allows developers to execute SmartObject methods using a SQL-like query syntax. This adapter can be used by most design tools and technologies that are capable of consuming an ADO.NET provider, for example ASP.NET and the Business Intelligence design tools in Microsoft Visual Studio. The most common use cases for the ADO.NET provider is to consume K2 SmartObjects in a simple user interface where the developer is familiar with ADO.NET, and to use the ADO.NET provider to create custom reports against K2 SmartObjects in a technology like Visual Studio Business Intelligence Projects.
The SourceCode.Data.SmartObjectsClient.dll assembly is the assembly that implements the ADO.NET provider, and this assembly is installed in the GAC of the K2 server and on developer workstations when the K2 Core, K2 Studio or K2 for Visual Studio development tools are installed. You can also find the assembly at the following location:
[Program Files (x86)]\K2 blackpearl\Bin\SourceCode.Data.SmartObjectsClient.dll
If you wish to explore the K2 assemblies in more detail, please refer to the Class Library Reference section of this developer reference.
The K2 SmartObject Data Provider implements an ADO.NET DataProvider by extending the Microsoft System.Data interfaces and abstract base classes. The interfaces were extended to surface the SmartObject API as a data source and to provide SQL-like syntax parsing that translates these SQL-like statements to the equivalent concepts exposed by SmartObjects.
The ADO.NET interfaces includes a set of strongly typed classes that allow it to recognize generic objects like tables, views, and stored procedures, as well as generic properties on these objects. These are known as concepts. What makes the K2 ADO.NET provider unique is how K2 blackpearl maps these concepts presented by ADO.NET to the Object Orientated concepts exposed by SmartObjects.
A SmartObject consists of Properties and Methods. Methods again consists of Parameters which can be unique to a method or are a “reference” to a SmartProperty defined on the SmartObject.
ADO.NET Concept | SmartObject Concept |
---|---|
Table | Results from a List Method |
Table Column | Return Property from a List Method |
Stored Procedure | Scalar Method (e.g. Create, Read, Update, Delete) |
Stored Procedure Parameters | Input Properties on scalar Methods |
Stored Procedure Columns | Return Properties on scalar Method |
Video | Links | Learn | Support |
No videos found for this article K2 on YouTube
No Additional links found for this article
No self-learning content for this article Try some scenarios...
No relevant support links available for this article
|