Datasource factory
The datasource factory creates datasource instances for the two types of datasources.
Note
The client variable in the following code examples refers to the IMClient instance. When using the Web SDK, the variable name can be chosen freely, but it is also called client at instantiation in the documentation.
Create flat datasources
To create a flat datasource, pass a unique name for the datasource to the CreateFlatDataSource method:
Create hierarchical datasources
To create a hierarchical datasource, pass a unique name for the datasource to the CreateHierarchicalDataSource method:
Note
The datasource instance is not persisted. The factory only creates an object. If the datasource needs to be persisted, use the CreateAsync on the IDataSourcesClient.