VistaDB 6
VistaDB.Entity Namespace / VistaDBProviderServices Class / GetService Method
The type of the service to be resolved.
An optional key providing additional information for resolving the service.


In This Topic
    GetService Method (VistaDBProviderServices)
    In This Topic
    Called to resolve additional default provider services when a derived type is registered as an EF provider either using an entry in the application's config file or through code-based registration in System.Data.Entity.DbConfiguration. The implementation of this method in this class uses the resolvers added with the AddDependencyResolver method to resolve dependencies.
    Syntax
    'Declaration
     
    
    Public Function GetService( _
       ByVal type As System.Type, _
       ByVal key As System.Object _
    ) As System.Object
    'Usage
     
    
    Dim instance As VistaDBProviderServices
    Dim type As System.Type
    Dim key As System.Object
    Dim value As System.Object
     
    value = instance.GetService(type, key)
    public System.object GetService( 
       System.Type type,
       System.object key
    )

    Parameters

    type
    The type of the service to be resolved.
    key
    An optional key providing additional information for resolving the service.

    Return Value

    An instance of the given type, or null if the service could not be resolved.
    Remarks
    Use this method to set, add, or change other provider-related services. Note that this method will only be called for such services if they are not already explicitly configured in some other way by the application. This allows providers to set default services while the application is still able to override and explicitly configure each service if required. See System.Data.Entity.Infrastructure.DependencyResolution.IDbDependencyResolver and System.Data.Entity.DbConfiguration for more details.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also