Browse Source

数据库操作控制台输出

master
boxu.zheng 1 year ago
parent
commit
46d205dd6c
  1. 16
      Code/Be/Faster.Zheng.Winin/src/Faster.Zheng.Winin.EntityFrameworkCore/EntityFrameworkCore/WininDbContext.cs

16
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 Volo.Abp.EntityFrameworkCore.Modeling;
using Faster.Zheng.Winin.AppBusiness.DemoCar; using Faster.Zheng.Winin.AppBusiness.DemoCar;
using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting; using Faster.Zheng.Winin.AppBaseBusiness.ExportCustomUserSetting;
using System;
namespace Faster.Zheng.Winin.EntityFrameworkCore; namespace Faster.Zheng.Winin.EntityFrameworkCore;
@ -144,5 +145,20 @@ public class WininDbContext :
/* Configure more properties here */ /* Configure more properties here */
}); });
}
#region 数据库操作控制台输出
/// <summary>
///
/// </summary>
/// <param name="optionsBuilder"></param>
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
base.OnConfiguring(optionsBuilder);
optionsBuilder.LogTo(Console.WriteLine);
} }
#endregion
} }

Loading…
Cancel
Save