gpt4 book ai didi

entity-framework-core - 为 Entity Framework Core 中的 DbContext.SaveChanges 获取生成的 SQL

转载 作者:行者123 更新时间:2023-12-03 23:12:00 25 4
gpt4 key购买 nike

在 Entity Framework Core 中,是否可以看到在 SaveChanges() 上调用 DbContext 方法时将应用的 SQL?

最佳答案

您可以使用控制台记录器“EF Core 日志记录自动与 .NET Core 的日志记录机制集成”
你可以在这里阅读:
https://www.entityframeworktutorial.net/efcore/logging-in-entityframework-core.aspx

关于entity-framework-core - 为 Entity Framework Core 中的 DbContext.SaveChanges 获取生成的 SQL,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/56310854/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com