CoreOptionsExtension.WithLoggerFactory(ILoggerFactory) 方法

定义

创建一个新的 实例,其所有选项都与此实例相同,但给定的选项已更改。 直接调用此方法是不寻常的。 请改用 DbContextOptionsBuilder

public virtual Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension WithLoggerFactory (Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
public virtual Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension WithLoggerFactory (Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory);
abstract member WithLoggerFactory : Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension
override this.WithLoggerFactory : Microsoft.Extensions.Logging.ILoggerFactory -> Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension
Public Overridable Function WithLoggerFactory (loggerFactory As ILoggerFactory) As CoreOptionsExtension

参数

loggerFactory
ILoggerFactory

要更改的选项。

返回

选项已更改的新实例。

适用于