Skip to content
This repository was archived by the owner on Dec 24, 2022. It is now read-only.

Commit cd8c8c3

Browse files
committed
Gain public access to T4 template OrmLiteSPStatement parameter values
1 parent df9017b commit cd8c8c3

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

src/ServiceStack.OrmLite/OrmLiteSPStatement.cs

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,20 @@ public class OrmLiteSPStatement : IDisposable
1010
private readonly IDbCommand dbCmd;
1111
private readonly IOrmLiteDialectProvider dialectProvider;
1212

13+
public bool TryGetParameterValue(string parameterName, out object value)
14+
{
15+
try
16+
{
17+
value = ((IDataParameter)dbCmd.Parameters[parameterName]).Value;
18+
return true;
19+
}
20+
catch(Exception)
21+
{
22+
value = null;
23+
return false;
24+
}
25+
}
26+
1327
public OrmLiteSPStatement(IDbCommand dbCmd)
1428
: this(null, dbCmd) {}
1529

0 commit comments

Comments
 (0)