Closed mKamiAsim closed 2 years ago
Are you using Serilog.Exceptions? If so this could be caused by https://github.com/dotnet/efcore/issues/15214
Even if you aren't you would encounter the same issue if you log the DbUpdateException
instance instead of the exception provided by this library. The code you mentioned uses the Entries
present on the exception object and doesn't query any entities on it's own.
Hi,
I received huge log file when DBUpdateException raised. Exception details added Entries of entire DB context along with Models and its attributes. As I am logging complete exception, single log produced 6Mb file.
I found following code in EntityFramework.Exceptions.Common might causing it
Include provider and version information EntityFrameworkCore.Exceptions.SqlServer 3.1.4 EF Core version: 5.0.13 Database provider: (e.g. Microsoft.EntityFrameworkCore.SqlServer) Target framework: (e.g. .NET 5.0) Operating system: IDE: (e.g. Visual Studio 2022 17.0.6)