Sprache

CosmosDbContextOptionsBuilder.WithOption Methode

Definition

Legt eine Option fest, indem die Erweiterung, die zum Speichern der Einstellungen verwendet wird, klonen. Dadurch wird sichergestellt, dass der Generator keine Optionen ändert, die bereits an anderer Stelle verwendet werden.

protected virtual Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder WithOption(Func<Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension,Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension> setAction);
abstract member WithOption : Func<Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension, Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension> -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
override this.WithOption : Func<Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension, Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension> -> Microsoft.EntityFrameworkCore.Infrastructure.CosmosDbContextOptionsBuilder
Protected Overridable Function WithOption (setAction As Func(Of CosmosOptionsExtension, CosmosOptionsExtension)) As CosmosDbContextOptionsBuilder

Parameter

setAction
Func<Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension,Microsoft.EntityFrameworkCore.Cosmos.Infrastructure.Internal.CosmosOptionsExtension>

Eine Aktion zum Festlegen der Option.

Gibt zurück

Dieselbe Generatorinstanz, sodass mehrere Aufrufe verkettet werden können.

Gilt für: