Udostępnij za pośrednictwem


IAdHocMapper Interface

Definition

Creates ad-hoc mappings of CLR types to entity types after the model has been built.

public interface IAdHocMapper
type IAdHocMapper = interface
Public Interface IAdHocMapper
Derived

Remarks

The service lifetime is Scoped. This means that each DbContext instance will use its own instance of this service. The implementation may depend on other services registered with any lifetime. The implementation does not need to be thread-safe.

See Implementation of database providers and extensions for more information and examples.

Methods

GetOrAddEntityType(Type)

Gets the ad-hoc entity type mapped for the given CLR type, or creates the mapping and returns it if it does not exist.

Applies to