This is the default behavior of EF Core (filling property DbParameterLogData.Valuewith "?").
To get real parameter values, you need to enable confidential data logging using the method DbContextOptionsBuilder.EnableSensitiveDataLogging:
Allows you to include application data in exception messages, logging, etc. This may include values ββassigned to the properties of entity instances, parameter values ββfor commands sent to the database , and other such data. You should enable this flag only if you have appropriate security measures based on the sensitivity of this data.
protected override void OnConfiguring(DbContextOptionsBuilder optionsBuilder)
{
optionsBuilder.EnableSensitiveDataLogging();
}
source
share