Interface IConventionStoredProcedure
- Namespace
- Microsoft.EntityFrameworkCore.Metadata
- Assembly
- Microsoft.EntityFrameworkCore.Relational.dll
Represents a stored procedure in a model in the form that can be mutated while the model is being built.
public interface IConventionStoredProcedure : IReadOnlyStoredProcedure, IReadOnlyAnnotatable, IConventionAnnotatable
- Inherited Members
Properties
Builder
Gets the builder that can be used to configure this stored procedure.
IConventionStoredProcedureBuilder Builder { get; }
Property Value
Exceptions
- InvalidOperationException
If the stored procedure has been removed from the model.
EntityType
Gets the entity type in which this stored procedure is defined.
IConventionEntityType EntityType { get; }
Property Value
- IConventionEntityType
Parameters
Gets the parameters for this stored procedure.
IReadOnlyList<IConventionStoredProcedureParameter> Parameters { get; }
Property Value
ResultColumns
Gets the columns of the result for this stored procedure.
IReadOnlyList<IConventionStoredProcedureResultColumn> ResultColumns { get; }
Property Value
Methods
AddOriginalValueParameter(string, bool)
Adds a new parameter that will hold the original value of the property with the given name.
IConventionStoredProcedureParameter? AddOriginalValueParameter(string propertyName, bool fromDataAnnotation = false)
Parameters
propertyName
stringThe name of the corresponding property.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureParameter
The added parameter.
AddParameter(string, bool)
Adds a new parameter mapped to the property with the given name.
IConventionStoredProcedureParameter? AddParameter(string propertyName, bool fromDataAnnotation = false)
Parameters
propertyName
stringThe name of the corresponding property.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureParameter
The added parameter.
AddResultColumn(string, bool)
Adds a new column of the result for this stored procedure mapped to the property with the given name
IConventionStoredProcedureResultColumn? AddResultColumn(string propertyName, bool fromDataAnnotation = false)
Parameters
propertyName
stringThe name of the corresponding property.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureResultColumn
The added column.
AddRowsAffectedParameter(bool)
Adds an output parameter that returns the rows affected by this stored procedure.
IConventionStoredProcedureParameter? AddRowsAffectedParameter(bool fromDataAnnotation = false)
Parameters
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureParameter
The added parameter.
AddRowsAffectedResultColumn(bool)
Adds a new column of the result that contains the rows affected by this stored procedure.
IConventionStoredProcedureResultColumn? AddRowsAffectedResultColumn(bool fromDataAnnotation = false)
Parameters
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- IConventionStoredProcedureResultColumn
The added column.
FindOriginalValueParameter(string)
Returns the original value parameter corresponding to the given property.
IConventionStoredProcedureParameter? FindOriginalValueParameter(string propertyName)
Parameters
propertyName
stringThe name of a property.
Returns
- IConventionStoredProcedureParameter
The original value parameter corresponding to the given property if found; null otherwise.
FindParameter(string)
Returns the parameter corresponding to the given property.
IConventionStoredProcedureParameter? FindParameter(string propertyName)
Parameters
propertyName
stringThe name of a property.
Returns
- IConventionStoredProcedureParameter
The parameter corresponding to the given property if found; null otherwise.
FindResultColumn(string)
Returns the result column corresponding to the given property.
IConventionStoredProcedureResultColumn? FindResultColumn(string propertyName)
Parameters
propertyName
stringThe name of a property.
Returns
- IConventionStoredProcedureResultColumn
The result column corresponding to the given property if found; null otherwise.
FindRowsAffectedParameter()
Returns the rows affected parameter.
IConventionStoredProcedureParameter? FindRowsAffectedParameter()
Returns
- IConventionStoredProcedureParameter
The rows affected parameter if found; null otherwise.
FindRowsAffectedResultColumn()
Returns the rows affected result column.
IConventionStoredProcedureResultColumn? FindRowsAffectedResultColumn()
Returns
- IConventionStoredProcedureResultColumn
The rows affected result column if found; null otherwise.
GetConfigurationSource()
Gets the configuration source for this stored procedure.
ConfigurationSource GetConfigurationSource()
Returns
- ConfigurationSource
The configuration source for this stored procedure.
GetNameConfigurationSource()
Gets the configuration source for Name.
ConfigurationSource? GetNameConfigurationSource()
Returns
- ConfigurationSource?
The configuration source for Name.
GetSchemaConfigurationSource()
Gets the configuration source for Schema.
ConfigurationSource? GetSchemaConfigurationSource()
Returns
- ConfigurationSource?
The configuration source for Schema.
SetIsRowsAffectedReturned(bool, bool)
Configures whether this stored procedure returns the number of rows affected.
bool SetIsRowsAffectedReturned(bool rowsAffectedReturned, bool fromDataAnnotation = false)
Parameters
rowsAffectedReturned
boolA value indicating whether the number of rows affected is returned.
fromDataAnnotation
boolIndicates whether the configuration was specified using a data annotation.
Returns
- bool
The configured value.
SetName(string?, bool)
Sets the name of the stored procedure in the database.
string? SetName(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
- string
The configured value.
SetSchema(string?, bool)
Sets the schema of the stored procedure in the database.
string? SetSchema(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
- string
The configured value.