DbDependencyResolverExtensions.GetService Method

 

Namespace:   System.Data.Entity.Infrastructure.DependencyResolution
Assembly:  EntityFramework (in EntityFramework.dll)

NameDescription
System_CAPS_pubmethodSystem_CAPS_staticGetService(IDbDependencyResolver, Type)

Calls GetService passing the given type argument and using null for the name argument.

System_CAPS_pubmethodSystem_CAPS_staticGetService<T>(IDbDependencyResolver)

Calls GetService passing the generic type of the method as the type argument and null for the name argument.

System_CAPS_pubmethodSystem_CAPS_staticGetService<T>(IDbDependencyResolver, Object)

Calls GetService passing the generic type of the method and the given name as arguments.


DbDependencyResolverExtensions.GetService Method (IDbDependencyResolver, Type)

Calls GetService passing the given type argument and using null for the name argument.

public static object GetService(
	this IDbDependencyResolver resolver,
	Type type
)

Parameters

resolver
Type: System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver

The resolver to use.

type
Type: System.Type

The contract type to resolve.

Return Value

Type: System.Object

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


DbDependencyResolverExtensions.GetService<T> Method (IDbDependencyResolver)

Calls GetService passing the generic type of the method as the type argument and null for the name argument.

public static T GetService<T>(
	this IDbDependencyResolver resolver
)

Return Value

Type: T

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

Type Parameters

T

The contract type to resolve.


DbDependencyResolverExtensions.GetService<T> Method (IDbDependencyResolver, Object)

Calls GetService passing the generic type of the method and the given name as arguments.

public static T GetService<T>(
	this IDbDependencyResolver resolver,
	object key
)

Parameters

resolver
Type: System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver

The resolver to use.

key
Type: System.Object

The key of the dependency to resolve.

Return Value

Type: T

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

Type Parameters

T

The contract type to resolve.