Interface IParameterBindingFactory
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.dll
Factory for finding and creating ParameterBinding instances.
public interface IParameterBindingFactory
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.
Methods
Bind(IConventionEntityType, Type, string)
Creates a ParameterBinding for the given type and name on the given entity type.
ParameterBinding Bind(IConventionEntityType entityType, Type parameterType, string parameterName)
Parameters
entityType
IConventionEntityTypeThe entity type.
parameterType
TypeThe parameter type.
parameterName
stringThe parameter name.
Returns
- ParameterBinding
The binding.
Bind(IMutableEntityType, Type, string)
Creates a ParameterBinding for the given type and name on the given entity type.
ParameterBinding Bind(IMutableEntityType entityType, Type parameterType, string parameterName)
Parameters
entityType
IMutableEntityTypeThe entity type.
parameterType
TypeThe parameter type.
parameterName
stringThe parameter name.
Returns
- ParameterBinding
The binding.
Bind(IReadOnlyEntityType, Type, string)
Creates a ParameterBinding for the given type and name on the given entity type.
ParameterBinding Bind(IReadOnlyEntityType entityType, Type parameterType, string parameterName)
Parameters
entityType
IReadOnlyEntityTypeThe entity type.
parameterType
TypeThe parameter type.
parameterName
stringThe 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.
bool CanBind(Type parameterType, string parameterName)