Class DefaultValueBinding
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.dll
Defines the binding of parameters to create the default value of a type.
public class DefaultValueBinding : InstantiationBinding
- Inheritance
-
DefaultValueBinding
- Inherited Members
Remarks
See Entity types with constructors for more information and examples.
Constructors
DefaultValueBinding(Type)
Creates a new DefaultValueBinding instance.
public DefaultValueBinding(Type runtimeType)
Parameters
runtimeType
TypeThe CLR type of the instance created by the factory method.
Properties
RuntimeType
The type that will be created from the expression tree created for this binding.
public override Type RuntimeType { get; }
Property Value
Methods
CreateConstructorExpression(ParameterBindingInfo)
Creates a MethodCallExpression using the given method.
public override Expression CreateConstructorExpression(ParameterBindingInfo bindingInfo)
Parameters
bindingInfo
ParameterBindingInfoInformation needed to create the expression.
Returns
- Expression
The expression tree.
With(IReadOnlyList<ParameterBinding>)
Creates a copy that contains the given parameter bindings.
public override InstantiationBinding With(IReadOnlyList<ParameterBinding> parameterBindings)
Parameters
parameterBindings
IReadOnlyList<ParameterBinding>The new parameter bindings.
Returns
- InstantiationBinding
A copy with replaced parameter bindings.