Share via


IEntityMaterializerSource Interface

Definition

Defines a source for generating Expression trees that read values from a ValueBuffer or creates entity instances.

This type is typically used by database providers (and other extensions). It is generally not used in application code.

public interface IEntityMaterializerSource
type IEntityMaterializerSource = interface
Public Interface IEntityMaterializerSource
Derived

Remarks

The service lifetime is Singleton. This means a single instance is used by many DbContext instances. The implementation must be thread-safe. This service cannot depend on services registered as Scoped.

See Implementation of database providers and extensions and How EF Core queries work for more information and examples.

Methods

CreateMaterializeExpression(EntityMaterializerSourceParameters, Expression)

Creates an Expression tree representing creating an entity instance.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

CreateMaterializeExpression(IEntityType, String, Expression)
Obsolete.

Creates an Expression tree representing creating an entity instance.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

CreateReadValueExpression(Expression, Type, Int32, IPropertyBase)

Creates an Expression tree representing reading a value from a ValueBuffer

This method is typically used by database providers (and other extensions). It is generally not used in application code.

GetEmptyMaterializer(IEntityType)

Returns a cached delegate that creates empty instances of the given entity type.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

GetMaterializer(IEntityType)

Returns a cached delegate that creates instances of the given entity type.

This method is typically used by database providers (and other extensions). It is generally not used in application code.

Applies to