Interface IConventionStoredProcedureBuilder
- Namespace
- Microsoft.EntityFrameworkCore.Metadata.Builders
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Provides a simple API for configuring a IConventionStoredProcedure.
public interface IConventionStoredProcedureBuilder : IConventionAnnotatableBuilder
Remarks
See Model building conventions for more information and examples.
Properties
Metadata
The function being configured.
IConventionStoredProcedure Metadata { get; }
Property Value
Methods
CanHaveOriginalValueParameter(string, bool)
Returns a value indicating whether a parameter holds the original value of the mapped property can be used for stored procedure.
bool CanHaveOriginalValueParameter(string propertyName, bool fromDataAnnotation = false)
Parameters
propertyName
stringThe property name.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanHaveParameter(string, bool)
Returns a value indicating whether a parameter mapped to the given property can be used for stored procedure.
bool CanHaveParameter(string propertyName, bool fromDataAnnotation = false)
Parameters
propertyName
stringThe property name.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanHaveResultColumn(string, bool)
Returns a value indicating whether a column of the result mapped to the given property can be used for stored procedure.
bool CanHaveResultColumn(string propertyName, bool fromDataAnnotation = false)
Parameters
propertyName
stringThe property name.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanHaveRowsAffectedParameter(bool)
Returns a value indicating whether a parameter that returns the rows affected can be used for stored procedure.
bool CanHaveRowsAffectedParameter(bool fromDataAnnotation = false)
Parameters
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanHaveRowsAffectedResultColumn(bool)
Returns a value indicating whether a column that contains the rows affected can be used for stored procedure.
bool CanHaveRowsAffectedResultColumn(bool fromDataAnnotation = false)
Parameters
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanSetName(string?, bool)
Returns a value indicating whether the given name can be set for the stored procedure.
bool CanSetName(string? name, bool fromDataAnnotation = false)
Parameters
name
stringThe name of the stored procedure in the database.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
CanSetSchema(string?, bool)
Returns a value indicating whether the given schema can be set for the stored procedure.
bool CanSetSchema(string? schema, bool fromDataAnnotation = false)
Parameters
schema
stringThe schema of the stored procedure in the database.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
HasName(string?, bool)
Sets the name of the stored procedure.
IConventionStoredProcedureBuilder? HasName(string? name, bool fromDataAnnotation = false)
Parameters
name
stringThe name of the stored procedure in the database.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureBuilder
The same builder instance if the configuration was applied, null otherwise.
HasName(string?, string?, bool)
Sets the name and schema of the stored procedure.
IConventionStoredProcedureBuilder? HasName(string? name, string? schema, bool fromDataAnnotation = false)
Parameters
name
stringThe name of the stored procedure in the database.
schema
stringThe schema of the stored procedure in the database.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureBuilder
The same builder instance if the configuration was applied, null otherwise.
HasOriginalValueParameter(string, bool)
Configures a new parameter that holds the original value of the property with the given name if no parameter mapped to the given property exists.
IConventionStoredProcedureParameterBuilder? HasOriginalValueParameter(string propertyName, bool fromDataAnnotation = false)
Parameters
propertyName
stringThe property name.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureParameterBuilder
The builder instance if the configuration was applied, null otherwise.
HasParameter(string, bool)
Configures a new parameter if no parameter mapped to the given property exists.
IConventionStoredProcedureParameterBuilder? HasParameter(string propertyName, bool fromDataAnnotation = false)
Parameters
propertyName
stringThe property name.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureParameterBuilder
The same builder instance if the configuration was applied, null otherwise.
HasResultColumn(string, bool)
Configures a new column of the result for this stored procedure. This is used for database generated columns.
IConventionStoredProcedureResultColumnBuilder? HasResultColumn(string propertyName, bool fromDataAnnotation = false)
Parameters
propertyName
stringThe property name.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureResultColumnBuilder
The builder instance if the configuration was applied, null otherwise.
HasRowsAffectedParameter(bool)
Configures a new parameter that returns the rows affected if no such parameter exists.
IConventionStoredProcedureParameterBuilder? HasRowsAffectedParameter(bool fromDataAnnotation = false)
Parameters
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureParameterBuilder
The builder instance if the configuration was applied, null otherwise.
HasRowsAffectedResultColumn(bool)
Configures a new column that contains the rows affected for this stored procedure if no such column exists.
IConventionStoredProcedureResultColumnBuilder? HasRowsAffectedResultColumn(bool fromDataAnnotation = false)
Parameters
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureResultColumnBuilder
The builder instance if the configuration was applied, null otherwise.
HasSchema(string?, bool)
Sets the schema of the stored procedure.
IConventionStoredProcedureBuilder? HasSchema(string? schema, bool fromDataAnnotation = false)
Parameters
schema
stringThe schema of the stored procedure in the database.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureBuilder
The same builder instance if the configuration was applied, null otherwise.