Reference > Configuration > Runtime

Entities

core concept: entities

Generically specify entity factory type

Syntax

Use<T>()

Arguments

T
The generic parameter that specifies the type of `IEntityFactory`. `T` must have a public parameterless constructor.

Use a factory

Syntax

Use({factory}[,{configureTypes}])

Arguments

factory
A factory responsible for returning entities.
configureTypes
A delegate that enables configuration of specific entity types.
syntax examples

When using a custom factory and registrations for specific entities are made, the custom factory MUST support those registrations (the dbExpression default factory does).

Configure entities using registered factory

Syntax

ForEntityTypes({configureTypes})

Arguments

configureTypes
A delegate that allows for configuring entity factories for specific entity types.

Configure specific entity type

Syntax

ForEntityType<T>().Use({factory})

Arguments

T
The generic parameter that specifies the type of `IDbEntity` to use the factory for. `T` must have a public parameterless constructor.
factory
A factory responsible for returning entities.
syntax examples
Previous
Value Converters

© 2024 dbExpression. All rights reserved.