BaseCodeGeneratorWithSite.GetService Method

[This page is specific to the Entity Framework version 6. The latest version is available as the 'Entity Framework' NuGet package. For more information about Entity Framework, see msdn.com/data/ef.]

method to get a service by its Type

Namespace:  Microsoft.Data.Entity.Design.VisualStudio.SingleFileGenerator
Assembly:  Microsoft.Data.Entity.Design (in Microsoft.Data.Entity.Design.dll)

Syntax

'Declaration
Protected Function GetService ( _
    serviceType As Type _
) As Object
'Usage
Dim serviceType As Type 
Dim returnValue As Object 

returnValue = Me.GetService(serviceType)
protected Object GetService(
    Type serviceType
)
protected:
Object^ GetService(
    Type^ serviceType
)
member GetService : 
        serviceType:Type -> Object
protected function GetService(
    serviceType : Type
) : Object

Parameters

  • serviceType
    Type: System.Type
    Type of service to retrieve

Return Value

Type: System.Object
an object that implements the requested service

See Also

Reference

BaseCodeGeneratorWithSite Class

Microsoft.Data.Entity.Design.VisualStudio.SingleFileGenerator Namespace