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
connectionIDbConnectionAn open connection to run the lookup on. A command that executes inside a transaction must use Transaction.
procedurestringThe 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.