Nuget to help Debug EF Core generated SQL statements
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
.gitignore
CODE_OF_CONDUCT.md
DataContextLoggerProvider.cs move the project to the root of the repo Mar 5, 2018
DbContextOptionsBuilderExtensions.cs
DebugEFCore.csproj
DebugEFCore.sln
LICENSE
readme-dev.md
readme.md add sample project reference to the readme Apr 26, 2018

readme.md

Debug Entity Framework Code

Nuget to debug the SQL statements Entity Framework Core is executing.

Entity Framework has a convenient way to log the SQL statements it executes. Unfortunately this functionality is not available out-of-the-box for Entity Framework Core. Entity Framework Core Issue #6482 captures this need.

Usage

using DebugEFCore;

public class SampleContext : DbContext
{
  protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
  {
    var debugLoggingEnabled = true;
    optionsBuilder.EnableLogging(debugLoggingEnabled);
  }
}

Sample Project

Installation

Follow the steps from the DebugEFCore Nuget Package.

Dependencies

License

MIT