The Visual Query / Pipeline Designer helps you build a chain of data-preparation actions.
Now what if your data comes from another source? For many things you can use the DnnSqlDataSource - but it won't cover everything. We'll add more DataSources in the future, but if you need anything custom - just create your own.
There are many cases where you would like to create a custom DataSource - for example:
-
Maybe you would like to have a FileDataSource which gives you a list of files from a specific folder…
- Maybe you want to get an RSS-Feed - just create an RssDataSource
- Or you want to get JSON data - JsonDataSource
- Or you want to help all the people who worked with Ventrian Articles and would like to create a VentrianDataSource where the designer doesn't need to know SQL - similar to our DNN FormAndList DataSource
In all these cases, just create your own DataSource.
To help you get started, I've prepared a bunch of stuff for you
#1 A Demo Visual Studio Solution with a Custom DataSource
The entire solution is on GitHub here: https://github.com/2sic/eav-Custom-DataSource. Just download or fork or whatever. It contains:
-
A DateTimeDataSource demonstrating all kinds of features and best practices
- A Unit-Testing project to test the code
We strongly recommend that you use unit testing with all DataSources (we do too) because otherwise testing just takes too long in a live web.
- Hint: in Visual Studio - press "Ctrl+R, A" to quickly run all the unit tests automatically
#2 A App containing Demos and Configuration
This can be found here: http://2sxc.org/en/Apps/Details?AppGuid=3bbc0160-a366-49db-99a0-0d50932e8fba
It contains:
- Some intro-help text
- Some demo queries using the DateTimeDataSource
- A content-type called "|Config MyCompany.DataSources.DateTimeDataSource" which the visual Query Designer opens when you want to configure your custom DataSources.
Have fun!
With love from Switzerland,
Daniel