Table of Contents

Method GetProcedureParameterNames

Namespace
Open.Database.Extensions
Assembly
Open.Database.Extensions.Core.dll

GetProcedureParameterNames(IDbConnection, string)

Gets the parameter names a stored procedure declares through the ADO.NET schema collection ProcedureParameters when the connection is a DbConnection whose provider supports it (SQL Server does), so parameters added with AddParam(value) find their real names.

protected override ImmutableArray<string> GetProcedureParameterNames(IDbConnection connection, string procedure)

Parameters

connection IDbConnection

An open connection to run the lookup on. A command that executes inside a transaction must use Transaction.

procedure string

The procedure name as given to the command.

Returns

ImmutableArray<string>

The names as the provider reports them (a leading @ is fine), or an empty or default array when they are not known.

Remarks

Any other connection gives no names, and the last member of each argument is used as written. See ExpressiveDbCommand for what is looked up and what is thrown.