Table of Contents

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

IConventionStoredProcedureBuilder

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

IReadOnlyList<IConventionStoredProcedureParameter>

ResultColumns

Gets the columns of the result for this stored procedure.

IReadOnlyList<IConventionStoredProcedureResultColumn> ResultColumns { get; }

Property Value

IReadOnlyList<IConventionStoredProcedureResultColumn>

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 string

The name of the corresponding property.

fromDataAnnotation bool

Indicates 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 string

The name of the corresponding property.

fromDataAnnotation bool

Indicates 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 string

The name of the corresponding property.

fromDataAnnotation bool

Indicates 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 bool

Indicates 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 bool

Indicates 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 string

The 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 string

The 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 string

The 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 bool

A value indicating whether the number of rows affected is returned.

fromDataAnnotation bool

Indicates 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 string

The name of the stored procedure in the database.

fromDataAnnotation bool

Indicates 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 string

The schema of the stored procedure in the database.

fromDataAnnotation bool

Indicates whether the configuration was specified using a data annotation.

Returns

string

The configured value.