Table of Contents

DataSource API: Root DataSources which Introduce Data

you are here (click to zoom) - discover the stack

If your DataSource creates new items - like from memory or elsewhere - it's called a Root DataSource.

Examples would be DataSources which...

  • ...get data from a WebApi
  • ...list files in a Folder
  • ...reads image file properties

Recommendations

  1. Inherit from the CustomDataSource base class
  2. Use ProvideOut and give it a lambda or method which returns the data either as...
    1. Anonymous objects
    2. RawEntity objects
  3. If applicable, also use the options on ProvideOut(..., options: ...) to customize how the data is converted to IEntities.
  4. Mark your sources in the VisualQuery Attribute as DataSourceType.Source

Read Also

History

  1. Introduced ca. EAV / 2sxc v6