DbContextOptionsBuilder.EnableSensitiveDataLogging DbContextOptionsBuilder.EnableSensitiveDataLogging DbContextOptionsBuilder.EnableSensitiveDataLogging Method

Definition

Overloads

EnableSensitiveDataLogging() EnableSensitiveDataLogging() EnableSensitiveDataLogging()

Enables application data to be included in exception messages, logging, etc. This can include the values assigned to properties of your entity instances, parameter values for commands being sent to the database, and other such data. You should only enable this flag if you have the appropriate security measures in place based on the sensitivity of this data.

EnableSensitiveDataLogging(Boolean) EnableSensitiveDataLogging(Boolean) EnableSensitiveDataLogging(Boolean)

Enables application data to be included in exception messages, logging, etc. This can include the values assigned to properties of your entity instances, parameter values for commands being sent to the database, and other such data. You should only enable this flag if you have the appropriate security measures in place based on the sensitivity of this data.

Note that if the application is setting the internal service provider through a call to UseInternalServiceProvider(IServiceProvider), then this option must configured the same way for all uses of that service provider. Consider instead not calling UseInternalServiceProvider(IServiceProvider) so that EF will manage the service providers and can create new instances as required.

EnableSensitiveDataLogging() EnableSensitiveDataLogging() EnableSensitiveDataLogging()

Enables application data to be included in exception messages, logging, etc. This can include the values assigned to properties of your entity instances, parameter values for commands being sent to the database, and other such data. You should only enable this flag if you have the appropriate security measures in place based on the sensitivity of this data.

public virtual Microsoft.EntityFrameworkCore.DbContextOptionsBuilder EnableSensitiveDataLogging ();
abstract member EnableSensitiveDataLogging : unit -> Microsoft.EntityFrameworkCore.DbContextOptionsBuilder
override this.EnableSensitiveDataLogging : unit -> Microsoft.EntityFrameworkCore.DbContextOptionsBuilder
Public Overridable Function EnableSensitiveDataLogging () As DbContextOptionsBuilder

Returns

The same builder instance so that multiple calls can be chained.

EnableSensitiveDataLogging(Boolean) EnableSensitiveDataLogging(Boolean) EnableSensitiveDataLogging(Boolean)

Enables application data to be included in exception messages, logging, etc. This can include the values assigned to properties of your entity instances, parameter values for commands being sent to the database, and other such data. You should only enable this flag if you have the appropriate security measures in place based on the sensitivity of this data.

Note that if the application is setting the internal service provider through a call to UseInternalServiceProvider(IServiceProvider), then this option must configured the same way for all uses of that service provider. Consider instead not calling UseInternalServiceProvider(IServiceProvider) so that EF will manage the service providers and can create new instances as required.

public virtual Microsoft.EntityFrameworkCore.DbContextOptionsBuilder EnableSensitiveDataLogging (bool sensitiveDataLoggingEnabled = true);
abstract member EnableSensitiveDataLogging : bool -> Microsoft.EntityFrameworkCore.DbContextOptionsBuilder
override this.EnableSensitiveDataLogging : bool -> Microsoft.EntityFrameworkCore.DbContextOptionsBuilder
Public Overridable Function EnableSensitiveDataLogging (Optional sensitiveDataLoggingEnabled As Boolean = true) As DbContextOptionsBuilder

Parameters

sensitiveDataLoggingEnabled
Boolean Boolean Boolean

Returns

The same builder instance so that multiple calls can be chained.

Applies to