Skip to content

Entity Framework Command Duration Interceptor - Outputs as a response header.

License

Notifications You must be signed in to change notification settings

YulerB/EF-Duration-Interceptor

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

EF-Duration-Interceptor

.NET .NET GITHUB PACKAGE CodeQL NuGet Badge Sonarqube Quality Gate Status Coverage

Entity Framework Command Duration Interceptor - Outputs as a response header.

To add the interceptor to DbContext call the AddInterceptors method when configuring your DbContext.

using EFDurationInterceptor;
...
services
  .AddDbContext<NvmContext>((provider, options) => options
  .UseSqlServer(connectionString)
  .AddInterceptors(provider.GetRequiredService<DurationDbInterceptor>())); 

A value is added to the response headers for both the duration setting up connections and the duration executing commands.

Screenshot

About

Entity Framework Command Duration Interceptor - Outputs as a response header.

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages