【发布时间】:2021-07-24 10:59:22
【问题描述】:
EF Core 5.0.5 记录以下内容:
Category: Microsoft.EntityFrameworkCore.Query
EventId: 10103
SpanId: 4d772cc84463cb4c
TraceId: d086e4d89efe374799fcebf1dd354a47
ParentId: 0000000000000000
RequestId: 80000a78-000b-ff00-b63f-84710c7967bb
RequestPath: /xxx/yyy
ActionId: 349a1893-80e4-4d19-9a60-44d1492988a4
ActionName: /xxx/yyy/Index
The query uses the 'First'/'FirstOrDefault' operator without 'OrderBy' and filter operators. This may lead to unpredictable results.
但是如果没有调用堆栈,它就不是很有帮助。
有没有办法让调用堆栈包含在内?或者有没有办法关闭只记录这条消息?
【问题讨论】:
标签: logging entity-framework-core warnings