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

Commit f603f29

Browse files
committed
Add OrmLiteConfig.AfterExecFilter
1 parent e3cd0f6 commit f603f29

File tree

2 files changed

+5
-0
lines changed

2 files changed

+5
-0
lines changed

src/ServiceStack.OrmLite/OrmLiteConfig.cs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -170,6 +170,8 @@ public static IOrmLiteExecFilter ExecFilter
170170
set => execFilter = value;
171171
}
172172

173+
public static Action<IDbCommand> AfterExecFilter { get; set; }
174+
173175
public static Action<IDbCommand, object> InsertFilter { get; set; }
174176
public static Action<IDbCommand, object> UpdateFilter { get; set; }
175177
public static Action<IUntypedSqlExpression> SqlExpressionSelectFilter { get; set; }

src/ServiceStack.OrmLite/OrmLiteExecFilter.cs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,9 @@ public virtual IDbCommand CreateCommand(IDbConnection dbConn)
4848
public virtual void DisposeCommand(IDbCommand dbCmd, IDbConnection dbConn)
4949
{
5050
if (dbCmd == null) return;
51+
52+
OrmLiteConfig.AfterExecFilter?.Invoke(dbCmd);
53+
5154
dbConn.SetLastCommandText(dbCmd.CommandText);
5255

5356
dbCmd.Dispose();

0 commit comments

Comments
 (0)