CoreOptionsExtension.WithLoggerFactory(ILoggerFactory) Method

Definition

Creates a new instance with all options the same as for this instance, but with the given option changed. It is unusual to call this method directly. Instead use DbContextOptionsBuilder.

C#
public virtual Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension WithLoggerFactory (Microsoft.Extensions.Logging.ILoggerFactory loggerFactory);
C#
public virtual Microsoft.EntityFrameworkCore.Infrastructure.CoreOptionsExtension WithLoggerFactory (Microsoft.Extensions.Logging.ILoggerFactory? loggerFactory);

Parameters

loggerFactory
ILoggerFactory

The option to change.

Returns

A new instance with the option changed.

Applies to

Proizvod Verzije
Entity Framework Core 2.0, 2.1, 2.2, 3.0, 3.1, 5.0, 6.0, 7.0, 8.0, 9.0