Table of Contents

Class OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

Namespace
Microsoft.EntityFrameworkCore.Metadata.Builders
Assembly
Microsoft.EntityFrameworkCore.Relational.dll

Provides a simple API for configuring a IMutableStoredProcedure that an entity type is mapped to.

public class OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> : OwnedNavigationStoredProcedureBuilder, IInfrastructure<OwnedNavigationBuilder>, IInfrastructure<IConventionStoredProcedureBuilder>, IInfrastructure<OwnedNavigationBuilder<TOwnerEntity, TDependentEntity>> where TOwnerEntity : class where TDependentEntity : class

Type Parameters

TOwnerEntity

The entity type owning the relationship.

TDependentEntity

The dependent entity type of the relationship.

Inheritance
OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>
Implements
IInfrastructure<OwnedNavigationBuilder>
IInfrastructure<OwnedNavigationBuilder<TOwnerEntity, TDependentEntity>>
Inherited Members

Constructors

OwnedNavigationStoredProcedureBuilder(IMutableStoredProcedure, OwnedNavigationBuilder<TOwnerEntity, TDependentEntity>)

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 OwnedNavigationStoredProcedureBuilder(IMutableStoredProcedure sproc, OwnedNavigationBuilder<TOwnerEntity, TDependentEntity> ownedNavigationBuilder)

Parameters

sproc IMutableStoredProcedure
ownedNavigationBuilder OwnedNavigationBuilder<TOwnerEntity, TDependentEntity>

Methods

HasAnnotation(string, object?)

Adds or updates an annotation on the stored procedure. If an annotation with the key specified in annotation already exists, its value will be updated.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasAnnotation(string annotation, object? value)

Parameters

annotation string

The key of the annotation to be added or updated.

value object

The value to be stored in the annotation.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasOriginalValueParameter(string)

Configures a new parameter that holds the original value if no parameter mapped to the given property exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasOriginalValueParameter(string propertyName)

Parameters

propertyName string

The property name.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasOriginalValueParameter(string, Action<StoredProcedureParameterBuilder>)

Configures a new parameter that holds the original value if no parameter mapped to the given property exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasOriginalValueParameter(string propertyName, Action<StoredProcedureParameterBuilder> buildAction)

Parameters

propertyName string

The parameter name.

buildAction Action<StoredProcedureParameterBuilder>

An action that performs configuration of the parameter.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasOriginalValueParameter<TProperty>(Expression<Func<TDependentEntity, TProperty>>)

Configures a new parameter that holds the original value if no parameter mapped to the given property exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasOriginalValueParameter<TProperty>(Expression<Func<TDependentEntity, TProperty>> propertyExpression)

Parameters

propertyExpression Expression<Func<TDependentEntity, TProperty>>

A lambda expression representing the property to be configured (blog => blog.Url).

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

Type Parameters

TProperty

HasOriginalValueParameter<TProperty>(Expression<Func<TDependentEntity, TProperty>>, Action<StoredProcedureParameterBuilder>)

Configures a new parameter that holds the original value if no parameter mapped to the given property exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasOriginalValueParameter<TProperty>(Expression<Func<TDependentEntity, TProperty>> propertyExpression, Action<StoredProcedureParameterBuilder> buildAction)

Parameters

propertyExpression Expression<Func<TDependentEntity, TProperty>>

A lambda expression representing the property to be configured (blog => blog.Url).

buildAction Action<StoredProcedureParameterBuilder>

An action that performs configuration of the parameter.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

Type Parameters

TProperty

HasParameter(string)

Configures a new parameter if no parameter mapped to the given property exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasParameter(string propertyName)

Parameters

propertyName string

The property name.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasParameter(string, Action<StoredProcedureParameterBuilder>)

Configures a new parameter if no parameter mapped to the given property exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasParameter(string propertyName, Action<StoredProcedureParameterBuilder> buildAction)

Parameters

propertyName string

The parameter name.

buildAction Action<StoredProcedureParameterBuilder>

An action that performs configuration of the parameter.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasParameter<TProperty>(Expression<Func<TDependentEntity, TProperty>>)

Configures a new parameter if no parameter mapped to the given property exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasParameter<TProperty>(Expression<Func<TDependentEntity, TProperty>> propertyExpression)

Parameters

propertyExpression Expression<Func<TDependentEntity, TProperty>>

A lambda expression representing the property to be configured (blog => blog.Url).

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

Type Parameters

TProperty

HasParameter<TProperty>(Expression<Func<TDependentEntity, TProperty>>, Action<StoredProcedureParameterBuilder>)

Configures a new parameter if no parameter mapped to the given property exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasParameter<TProperty>(Expression<Func<TDependentEntity, TProperty>> propertyExpression, Action<StoredProcedureParameterBuilder> buildAction)

Parameters

propertyExpression Expression<Func<TDependentEntity, TProperty>>

A lambda expression representing the property to be configured (blog => blog.Url).

buildAction Action<StoredProcedureParameterBuilder>

An action that performs configuration of the parameter.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

Type Parameters

TProperty

HasResultColumn(string)

Configures a new column of the result for this stored procedure. This is used for database generated columns.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasResultColumn(string propertyName)

Parameters

propertyName string

The property name.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasResultColumn(string, Action<StoredProcedureResultColumnBuilder>)

Configures a new column of the result for this stored procedure. This is used for database generated columns.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasResultColumn(string propertyName, Action<StoredProcedureResultColumnBuilder> buildAction)

Parameters

propertyName string

The property name.

buildAction Action<StoredProcedureResultColumnBuilder>

An action that performs configuration of the column.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasResultColumn<TProperty>(Expression<Func<TDependentEntity, TProperty>>)

Configures a new column of the result for this stored procedure. This is used for database generated columns.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasResultColumn<TProperty>(Expression<Func<TDependentEntity, TProperty>> propertyExpression)

Parameters

propertyExpression Expression<Func<TDependentEntity, TProperty>>

A lambda expression representing the property to be configured (blog => blog.Url).

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

Type Parameters

TProperty

HasResultColumn<TProperty>(Expression<Func<TDependentEntity, TProperty>>, Action<StoredProcedureResultColumnBuilder>)

Configures a new column of the result for this stored procedure. This is used for database generated columns.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasResultColumn<TProperty>(Expression<Func<TDependentEntity, TProperty>> propertyExpression, Action<StoredProcedureResultColumnBuilder> buildAction)

Parameters

propertyExpression Expression<Func<TDependentEntity, TProperty>>

A lambda expression representing the property to be configured (blog => blog.Url).

buildAction Action<StoredProcedureResultColumnBuilder>

An action that performs configuration of the column.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

Type Parameters

TProperty

HasRowsAffectedParameter()

Configures a new parameter that returns the rows affected if no such parameter exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasRowsAffectedParameter()

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasRowsAffectedParameter(Action<StoredProcedureParameterBuilder>)

Configures a new parameter that returns the rows affected if no such parameter exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasRowsAffectedParameter(Action<StoredProcedureParameterBuilder> buildAction)

Parameters

buildAction Action<StoredProcedureParameterBuilder>

An action that performs configuration of the parameter.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasRowsAffectedResultColumn()

Configures a new column of the result that returns the rows affected for this stored procedure if no such column exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasRowsAffectedResultColumn()

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasRowsAffectedResultColumn(Action<StoredProcedureResultColumnBuilder>)

Configures a new column of the result that returns the rows affected for this stored procedure if no such column exists.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasRowsAffectedResultColumn(Action<StoredProcedureResultColumnBuilder> buildAction)

Parameters

buildAction Action<StoredProcedureResultColumnBuilder>

An action that performs configuration of the column.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.

HasRowsAffectedReturnValue(bool)

Configures the result of this stored procedure to be the number of rows affected.

public virtual OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity> HasRowsAffectedReturnValue(bool rowsAffectedReturned = true)

Parameters

rowsAffectedReturned bool

A value indicating whether this stored procedure returns the number of rows affected.

Returns

OwnedNavigationStoredProcedureBuilder<TOwnerEntity, TDependentEntity>

The same builder instance so that multiple configuration calls can be chained.