Skip to content

Commit 5e4bb26

Browse files
committed
Refactor event invocations
1 parent 6f4bdaf commit 5e4bb26

File tree

1 file changed

+2
-5
lines changed

1 file changed

+2
-5
lines changed

Orm/Xtensive.Orm/Orm/SessionEventAccessor.cs

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -245,15 +245,12 @@ public sealed class SessionEventAccessor
245245

246246
internal void NotifyDbCommandExecuting(DbCommand command)
247247
{
248-
if (DbCommandExecuting!=null)
249-
DbCommandExecuting(this, new DbCommandEventArgs(command));
248+
DbCommandExecuting?.Invoke(this, new DbCommandEventArgs(command));
250249
}
251250

252251
internal void NotifyDbCommandExecuted(DbCommand command, Exception exception = null)
253252
{
254-
if(DbCommandExecuted!=null)
255-
DbCommandExecuted(this, new DbCommandEventArgs(command, exception));
256-
253+
DbCommandExecuted?.Invoke(this, new DbCommandEventArgs(command, exception));
257254
}
258255

259256
internal Expression NotifyQueryExecuting(Expression expression)

0 commit comments

Comments
 (0)