Open
Description
Bug Description
When trying to execute a stored procedure I get a missing parameter exception. I have tried this with both the async and non-async methods and with both methods of executing a stored procedure. I have also tried various permutations of providing the ProviderID parameter.
ids = await cnn.ExecuteQueryAsync<int>("exec dbo.s_API_Subscriptions_DiscountsForProvider(@ProviderID);", new {request.ProviderID},
CommandType.StoredProcedure, cancellationToken: cancellationToken);
ids = cnn.ExecuteQuery<int>("dbo.s_API_Subscriptions_DiscountsForProvider", new {ProviderID=1234},
CommandType.StoredProcedure);
If I remove the parameter from the stored procedure and execute without passing any parameters it works 👍
ids = await cnn.ExecuteQueryAsync<int>("dbo.s_API_Subscriptions_DiscountsForProvider", commandType:
CommandType.StoredProcedure, cancellationToken: cancellationToken);
Exception Message:
Procedure or function 's_API_Subscriptions_DiscountsForProvider' expects parameter '@ProviderID', which was not supplied.
The stored procedure implementation is very simple:
CREATE OR ALTER PROCEDURE dbo.s_API_Subscriptions_DiscountsForProvider
@ProviderID INT
AS
BEGIN
Library Version:
Example: RepoDb v1.12.7 and RepoDb.SqlServer v1.1.3