From 46d205dd6ceea350a4c2a40fbd960d01f2f24354 Mon Sep 17 00:00:00 2001 From: "boxu.zheng" Date: Thu, 27 Jul 2023 13:15:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=95=B0=E6=8D=AE=E5=BA=93=E6=93=8D=E4=BD=9C?= =?UTF-8?q?=E6=8E=A7=E5=88=B6=E5=8F=B0=E8=BE=93=E5=87=BA?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../EntityFrameworkCore/WininDbContext.cs | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContext.cs b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContext.cs index cb0868f..2e3840b 100644 --- a/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContext.cs +++ b/Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContext.cs @@ -16,6 +16,7 @@ using Faster.Zheng.Winin.AppBusiness.TestSchool; using Volo.Abp.EntityFrameworkCore.Modeling; using Faster.Zheng.Winin.AppBusiness.DemoCar; using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; +using System; namespace Faster.Zheng.Winin.EntityFrameworkCore; @@ -144,5 +145,20 @@ public class WininDbContext : /* Configure more properties here */ }); + + } + + #region 数据库操作控制台输出 + + /// + /// + /// + /// + protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder) + { + base.OnConfiguring(optionsBuilder); + optionsBuilder.LogTo(Console.WriteLine); } + + #endregion }