Table of Contents

Class LazyLoaderParameterBindingFactory

Namespace
Microsoft.EntityFrameworkCore.Metadata
Assembly
Microsoft.EntityFrameworkCore.dll

A IParameterBindingFactory for binding to the Microsoft.EntityFrameworkCore.Infrastructure.ILazyLoader service.

public class LazyLoaderParameterBindingFactory : ServiceParameterBindingFactory, IParameterBindingFactory
Inheritance
LazyLoaderParameterBindingFactory
Implements
Inherited Members

Remarks

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

See Entity types with constructors for more information and examples.

Constructors

LazyLoaderParameterBindingFactory(LazyLoaderParameterBindingFactoryDependencies)

Creates a new LazyLoaderParameterBindingFactory instance.

public LazyLoaderParameterBindingFactory(LazyLoaderParameterBindingFactoryDependencies dependencies)

Parameters

dependencies LazyLoaderParameterBindingFactoryDependencies

The service dependencies to use.

Properties

Dependencies

Dependencies for this service.

protected virtual LazyLoaderParameterBindingFactoryDependencies Dependencies { get; }

Property Value

LazyLoaderParameterBindingFactoryDependencies

Methods

Bind(IConventionEntityType, Type, string)

Creates a ParameterBinding for the given type and name on the given entity type.

public override ParameterBinding Bind(IConventionEntityType entityType, Type parameterType, string parameterName)

Parameters

entityType IConventionEntityType

The entity type.

parameterType Type

The parameter type.

parameterName string

The parameter name.

Returns

ParameterBinding

The binding.

Bind(IMutableEntityType, Type, string)

Creates a ParameterBinding for the given type and name on the given entity type.

public override ParameterBinding Bind(IMutableEntityType entityType, Type parameterType, string parameterName)

Parameters

entityType IMutableEntityType

The entity type.

parameterType Type

The parameter type.

parameterName string

The parameter name.

Returns

ParameterBinding

The binding.

Bind(IReadOnlyEntityType, Type, string)

Creates a ParameterBinding for the given type and name on the given entity type.

public override ParameterBinding Bind(IReadOnlyEntityType entityType, Type parameterType, string parameterName)

Parameters

entityType IReadOnlyEntityType

The entity type.

parameterType Type

The parameter type.

parameterName string

The parameter name.

Returns

ParameterBinding

The binding.

CanBind(Type, string)

Checks whether or not this factory can bind a parameter with the given type and name.

public override bool CanBind(Type parameterType, string parameterName)

Parameters

parameterType Type

The parameter type.

parameterName string

The parameter name.

Returns

bool

true if this parameter can be bound; false otherwise.