var testQuery = $@"
INSERT INTO [{databaseName}].[dbo].[steptable] ([Type], [ParentKey], [SubWorkflowCode], [Sequence], [WorkflowKey])
OUTPUT inserted.[Key]
VALUES (@Type, CASE WHEN @ParentKey = 0 THEN NULL ELSE @ParentKey END, @SubWorkflowCode, @Sequence, @WorkflowKey);";
var test = await connection.ExecuteAsync(testQuery, step);
var testQuery = $@"
INSERT INTO [{databaseName}].[dbo].[steptable] ([Type], [ParentKey], [SubWorkflowCode], [Sequence], [WorkflowKey])
OUTPUT inserted.[Key]
VALUES (@Type, CASE WHEN @ParentKey = 0 THEN NULL ELSE @ParentKey END, @SubWorkflowCode, @Sequence, @WorkflowKey);";
var test = await connection.ExecuteAsync(testQuery, step);