Permalink
Branch: master
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
15 lines (14 sloc) 378 Bytes
using Microsoft.EntityFrameworkCore;
namespace DebugEFCore
{
public static class DbContextOptionsBuilderExtensions
{
public static void EnableLogging(this DbContextOptionsBuilder optionsBuilder, bool loggingEnabled = true)
{
if (loggingEnabled)
{
optionsBuilder.UseLoggerFactory(DataContextLoggerProvider.CreateFactory());
}
}
}
}