Table of Contents

Class QueryDefinitionFactory

Namespace
ToSic.Eav.DataSource.Query.Sys
Assembly
ToSic.Eav.DataSource.dll

Helper to build a QueryDefinition objects based on a query definition entity.

[InternalApi_DoNotUse_MayChangeWithoutNotice]
public class QueryDefinitionFactory : ServiceBase, IHasLog
Inheritance
object
QueryDefinitionFactory
Implements
Inherited Members

Remarks

Made visible in the docs v21.02, but still just fyi/internal.

Constructors

QueryDefinitionFactory(DataSourceCatalog)

Helper to build a QueryDefinition objects based on a query definition entity.

public QueryDefinitionFactory(DataSourceCatalog dsCatalog)

Parameters

dsCatalog DataSourceCatalog

Remarks

Made visible in the docs v21.02, but still just fyi/internal.

Methods

Create(int, IEntity)

Create a QueryDefinition based on the given query definition entity.

public QueryDefinition Create(int appId, IEntity entity)

Parameters

appId int
entity IEntity

Returns

QueryDefinition

Remarks

The entity should have the correct metadata and properties to be used as a query definition, otherwise this will fail. This is usually used to create a QueryDefinition from an entity stored in the database, but it can also be used to create a QueryDefinition from an entity created in memory (e.g. for testing purposes).