mirror of
https://github.com/NoiTheCat/BirthdayBot.git
synced 2024-11-22 05:54:36 +00:00
Debug query logging
This commit is contained in:
parent
4e0f23c033
commit
a88797cb0a
1 changed files with 3 additions and 0 deletions
|
@ -24,6 +24,9 @@ public class BotDatabaseContext : DbContext {
|
||||||
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
|
||||||
=> optionsBuilder
|
=> optionsBuilder
|
||||||
.UseNpgsql(NpgsqlConnectionString)
|
.UseNpgsql(NpgsqlConnectionString)
|
||||||
|
#if DEBUG
|
||||||
|
.LogTo((string line) => Program.Log("EF", line), Microsoft.Extensions.Logging.LogLevel.Information)
|
||||||
|
#endif
|
||||||
.UseSnakeCaseNamingConvention();
|
.UseSnakeCaseNamingConvention();
|
||||||
|
|
||||||
protected override void OnModelCreating(ModelBuilder modelBuilder) {
|
protected override void OnModelCreating(ModelBuilder modelBuilder) {
|
||||||
|
|
Loading…
Reference in a new issue