Jazyk

EntityFrameworkServicesBuilder.TryAdd Metoda

Definice

Přetížení

Název Description
TryAdd(Type, Object)

Přidá implementaci služby Entity Framework pouze v případě, že ještě není zaregistrovaný. Tuto metodu lze použít pouze pro jednoúčelové služby.

TryAdd(Type, Type)

Přidá implementaci služby Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

TryAdd(Type, Type, Func<IServiceProvider,Object>)

Přidá objekt pro vytváření pro službu Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

TryAdd<TService,TImplementation>()

Přidá implementaci služby Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

TryAdd<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

Přidá objekt pro vytváření pro službu Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

TryAdd<TService>(Func<IServiceProvider,TService>)

Přidá objekt pro vytváření pro službu Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

TryAdd<TService>(TService)

Přidá implementaci služby Entity Framework pouze v případě, že ještě není zaregistrovaný. Tuto metodu lze použít pouze pro jednoúčelové služby.

TryAdd(Type, Object)

Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs

Přidá implementaci služby Entity Framework pouze v případě, že ještě není zaregistrovaný. Tuto metodu lze použít pouze pro jednoúčelové služby.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder TryAdd(Type serviceType, object implementation);
abstract member TryAdd : Type * obj -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder
override this.TryAdd : Type * obj -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder
Public Overridable Function TryAdd (serviceType As Type, implementation As Object) As EntityFrameworkServicesBuilder

Parametry

serviceType
Type

Smlouva o službě.

implementation
Object

Implementace služby.

Návraty

Tento tvůrce, aby bylo možné další volání zřetězit.

Poznámky

Další informace a příklady najdete v tématu Implementace poskytovatelů databází a rozšíření .

Platí pro

TryAdd(Type, Type)

Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs

Přidá implementaci služby Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder TryAdd(Type serviceType, Type implementationType);
abstract member TryAdd : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder
override this.TryAdd : Type * Type -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder
Public Overridable Function TryAdd (serviceType As Type, implementationType As Type) As EntityFrameworkServicesBuilder

Parametry

serviceType
Type

Smlouva o službě.

implementationType
Type

Konkrétní typ, který implementuje službu.

Návraty

Tento tvůrce, aby bylo možné další volání zřetězit.

Poznámky

Další informace a příklady najdete v tématu Implementace poskytovatelů databází a rozšíření .

Platí pro

TryAdd(Type, Type, Func<IServiceProvider,Object>)

Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs

Přidá objekt pro vytváření pro službu Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder TryAdd(Type serviceType, Type implementationType, Func<IServiceProvider,object> factory);
abstract member TryAdd : Type * Type * Func<IServiceProvider, obj> -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder
override this.TryAdd : Type * Type * Func<IServiceProvider, obj> -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder
Public Overridable Function TryAdd (serviceType As Type, implementationType As Type, factory As Func(Of IServiceProvider, Object)) As EntityFrameworkServicesBuilder

Parametry

serviceType
Type

Smlouva o službě.

implementationType
Type

Konkrétní typ, který implementuje službu.

factory
Func<IServiceProvider,Object>

Objekt pro vytváření, který vytvoří instanci služby.

Návraty

Tento tvůrce, aby bylo možné další volání zřetězit.

Poznámky

Další informace a příklady najdete v tématu Implementace poskytovatelů databází a rozšíření .

Platí pro

TryAdd<TService,TImplementation>()

Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs

Přidá implementaci služby Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder TryAdd<TService,TImplementation>() where TService : class where TImplementation : class, TService;
abstract member TryAdd : unit -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder (requires 'Service : null)
override this.TryAdd : unit -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder (requires 'Service : null)
Public Overridable Function TryAdd(Of TService As Class, TImplementation As Class) () As EntityFrameworkServicesBuilder

Parametry typu

TService

Smlouva o službě.

TImplementation

Konkrétní typ, který implementuje službu.

Návraty

Tento tvůrce, aby bylo možné další volání zřetězit.

Poznámky

Další informace a příklady najdete v tématu Implementace poskytovatelů databází a rozšíření .

Platí pro

TryAdd<TService,TImplementation>(Func<IServiceProvider,TImplementation>)

Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs

Přidá objekt pro vytváření pro službu Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder TryAdd<TService,TImplementation>(Func<IServiceProvider,TImplementation> factory) where TService : class where TImplementation : class, TService;
abstract member TryAdd : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder (requires 'Service : null)
override this.TryAdd : Func<IServiceProvider, #'Service> -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder (requires 'Service : null)
Public Overridable Function TryAdd(Of TService As Class, TImplementation As Class) (factory As Func(Of IServiceProvider, TImplementation)) As EntityFrameworkServicesBuilder

Parametry typu

TService

Smlouva o službě.

TImplementation

Konkrétní typ, který implementuje službu.

Parametry

factory
Func<IServiceProvider,TImplementation>

Objekt pro vytváření, který vytvoří instanci služby.

Návraty

Tento tvůrce, aby bylo možné další volání zřetězit.

Poznámky

Další informace a příklady najdete v tématu Implementace poskytovatelů databází a rozšíření .

Platí pro

TryAdd<TService>(Func<IServiceProvider,TService>)

Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs

Přidá objekt pro vytváření pro službu Entity Framework pouze v případě, že ještě není zaregistrovaný. Obor služby je automaticky definován rozhraním Entity Framework.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder TryAdd<TService>(Func<IServiceProvider,TService> factory) where TService : class;
abstract member TryAdd : Func<IServiceProvider, 'Service (requires 'Service : null)> -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder (requires 'Service : null)
override this.TryAdd : Func<IServiceProvider, 'Service (requires 'Service : null)> -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder (requires 'Service : null)
Public Overridable Function TryAdd(Of TService As Class) (factory As Func(Of IServiceProvider, TService)) As EntityFrameworkServicesBuilder

Parametry typu

TService

Smlouva o službě.

Parametry

factory
Func<IServiceProvider,TService>

Objekt pro vytváření, který vytvoří instanci služby.

Návraty

Tento tvůrce, aby bylo možné další volání zřetězit.

Poznámky

Další informace a příklady najdete v tématu Implementace poskytovatelů databází a rozšíření .

Platí pro

TryAdd<TService>(TService)

Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs
Zdroj:
EntityFrameworkServicesBuilder.cs

Přidá implementaci služby Entity Framework pouze v případě, že ještě není zaregistrovaný. Tuto metodu lze použít pouze pro jednoúčelové služby.

public virtual Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder TryAdd<TService>(TService implementation) where TService : class;
abstract member TryAdd : 'Service -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder (requires 'Service : null)
override this.TryAdd : 'Service -> Microsoft.EntityFrameworkCore.Infrastructure.EntityFrameworkServicesBuilder (requires 'Service : null)
Public Overridable Function TryAdd(Of TService As Class) (implementation As TService) As EntityFrameworkServicesBuilder

Parametry typu

TService

Smlouva o službě.

Parametry

implementation
TService

Implementace služby.

Návraty

Tento tvůrce, aby bylo možné další volání zřetězit.

Poznámky

Další informace a příklady najdete v tématu Implementace poskytovatelů databází a rozšíření .

Platí pro