Share via


DbDependencyResolverExtensions.GetService Method

Definition

Overloads

GetService(IDbDependencyResolver, Type)

Calls GetService(Type, Object) passing the given type argument and using null for the name argument.

GetService<T>(IDbDependencyResolver)

Calls GetService(Type, Object) passing the generic type of the method as the type argument and null for the name argument.

GetService<T>(IDbDependencyResolver, Object)

Calls GetService(Type, Object) passing the generic type of the method and the given name as arguments.

GetService(IDbDependencyResolver, Type)

Calls GetService(Type, Object) passing the given type argument and using null for the name argument.

public static object GetService (this System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver resolver, Type type);
static member GetService : System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver * Type -> obj

Parameters

resolver
IDbDependencyResolver

The resolver to use.

type
Type

The contract type to resolve.

Returns

The resolved dependency, or null if the resolver could not resolve it.

Applies to

GetService<T>(IDbDependencyResolver)

Calls GetService(Type, Object) passing the generic type of the method as the type argument and null for the name argument.

public static T GetService<T> (this System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver resolver);
static member GetService : System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver -> 'T
<Extension()>
Public Function GetService(Of T) (resolver As IDbDependencyResolver) As T

Type Parameters

T

The contract type to resolve.

Parameters

resolver
IDbDependencyResolver

The resolver to use.

Returns

T

The resolved dependency, or null if the resolver could not resolve it.

Applies to

GetService<T>(IDbDependencyResolver, Object)

Calls GetService(Type, Object) passing the generic type of the method and the given name as arguments.

public static T GetService<T> (this System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver resolver, object key);
static member GetService : System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver * obj -> 'T
<Extension()>
Public Function GetService(Of T) (resolver As IDbDependencyResolver, key As Object) As T

Type Parameters

T

The contract type to resolve.

Parameters

resolver
IDbDependencyResolver

The resolver to use.

key
Object

The key of the dependency to resolve.

Returns

T

The resolved dependency, or null if the resolver could not resolve it.

Applies to