File tree 2 files changed +9
-1
lines changed 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 1
1
<Project >
2
2
<PropertyGroup >
3
3
<TargetFrameworks >net8.0</TargetFrameworks >
4
- <Version >1.0-rc.7 </Version >
4
+ <Version >1.0-rc.8 </Version >
5
5
<TreatWarningsAsErrors >false</TreatWarningsAsErrors >
6
6
<Deterministic >true</Deterministic >
7
7
<Features >strict</Features >
Original file line number Diff line number Diff line change 4
4
using JetBrains . Annotations ;
5
5
using Microsoft . AspNetCore . Builder ;
6
6
using Microsoft . EntityFrameworkCore ;
7
+ using Microsoft . EntityFrameworkCore . Diagnostics ;
7
8
using Microsoft . Extensions . DependencyInjection ;
8
9
using Microsoft . Extensions . Diagnostics . HealthChecks ;
9
10
@@ -58,6 +59,12 @@ public IDatabaseAdapter UseDiagnostic(bool sensitiveEnabled = false)
58
59
Builder . EnableDetailedErrors ( ) ;
59
60
return this ;
60
61
}
62
+
63
+ public IDatabaseAdapter UseInterceptor < T > ( ) where T : IInterceptor , new ( )
64
+ {
65
+ Builder . AddInterceptors ( Activator . CreateInstance < T > ( ) ) ;
66
+ return this ;
67
+ }
61
68
}
62
69
63
70
public interface IDatabaseDbContextOptionsAccessor
@@ -70,4 +77,5 @@ public interface IDatabaseAdapter
70
77
{
71
78
IDatabaseAdapter UseLazyLoading ( ) ;
72
79
IDatabaseAdapter UseDiagnostic ( bool sensitiveEnabled = false ) ;
80
+ IDatabaseAdapter UseInterceptor < T > ( ) where T : IInterceptor , new ( ) ;
73
81
}
You can’t perform that action at this time.
0 commit comments