Class StoredProcedureParameterBuilder
- Namespace
- Microsoft.EntityFrameworkCore.Metadata.Builders
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Provides a simple API for configuring a IStoredProcedure parameter.
public class StoredProcedureParameterBuilder : IInfrastructure<PropertyBuilder?>
- Inheritance
-
StoredProcedureParameterBuilder
- Implements
-
IInfrastructure<PropertyBuilder>
- Inherited Members
Remarks
Instances of this class are returned from methods when using the Microsoft.EntityFrameworkCore.ModelBuilder API and it is not designed to be directly constructed in your application code.
Constructors
StoredProcedureParameterBuilder(InternalStoredProcedureParameterBuilder, PropertyBuilder?)
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
public StoredProcedureParameterBuilder(InternalStoredProcedureParameterBuilder builder, PropertyBuilder? propertyBuilder)
Parameters
builder
InternalStoredProcedureParameterBuilderpropertyBuilder
PropertyBuilder
Properties
Builder
This is an internal API that supports the Entity Framework Core infrastructure and not subject to the same compatibility standards as public APIs. It may be changed or removed without notice in any release. You should only use it directly in your code with extreme caution and knowing that doing so can result in application failures when updating to a new Entity Framework Core release.
protected virtual InternalStoredProcedureParameterBuilder Builder { get; }
Property Value
Metadata
The stored procedure parameter being configured.
public virtual IMutableStoredProcedureParameter Metadata { get; }
Property Value
Methods
HasAnnotation(string, object?)
Adds or updates an annotation on the property for a specific stored procedure.
If an annotation with the key specified in annotation
already exists, its value will be updated.
public virtual StoredProcedureParameterBuilder HasAnnotation(string annotation, object? value)
Parameters
annotation
stringThe key of the annotation to be added or updated.
value
objectThe value to be stored in the annotation.
Returns
- StoredProcedureParameterBuilder
The same builder instance so that multiple configuration calls can be chained.
HasName(string)
Sets the name of the stored procedure parameter.
public virtual StoredProcedureParameterBuilder HasName(string name)
Parameters
name
stringThe store type of the function parameter in the database.
Returns
- StoredProcedureParameterBuilder
The same builder instance so that further configuration calls can be chained.
Remarks
See Modeling entity types and relationships and Saving data with EF Core for more information and examples.
IsInputOutput()
Configures the stored procedure parameter as both an input and output parameter.
public virtual StoredProcedureParameterBuilder IsInputOutput()
Returns
- StoredProcedureParameterBuilder
The same builder instance so that further configuration calls can be chained.
Remarks
See Modeling entity types and relationships and Saving data with EF Core for more information and examples.
IsOutput()
Configures the stored procedure parameter as an output parameter.
public virtual StoredProcedureParameterBuilder IsOutput()
Returns
- StoredProcedureParameterBuilder
The same builder instance so that further configuration calls can be chained.
Remarks
See Modeling entity types and relationships and Saving data with EF Core for more information and examples.