T
LEADTOOLS Medical (Leadtools.Medical.DataAccessLayer assembly) Send comments on this topic. | Back to Introduction - All Topics | Help Version 17.0.3.30
CreateDataAccessAgent<T> Method
See Also 
Leadtools.Medical.DataAccessLayer Namespace > DataAccessFactory Class : CreateDataAccessAgent<T> Method



Creates a data provider from the Leadtools.Medical.DataAccessLayer.Configuration.DataAccessMapping.DataAccessType returned from the IDataAccessConfigurationView.

Syntax

Visual Basic (Declaration) 
Public Overridable Function CreateDataAccessAgent(Of T)() As T
Visual Basic (Usage)Copy Code
Dim instance As DataAccessFactory
Dim value As T
 
value = instance.CreateDataAccessAgent(Of T)()
C# 
public virtual T CreateDataAccessAgent<T>()
C++/CLI 
public:
virtual T^ CreateDataAccessAgentgeneric<typename T>
(); 

Type Parameters

T

Return Value

The data provider object which correspond to the Leadtools.Medical.DataAccessLayer.Configuration.DataAccessMapping.DataAccessType.

Example

For an example of using the GetInstance refer to the "Leadtools.Medical.Winforms" project.

Remarks

This method will not try to create a data provider from the generic type. It will create a provider from the type configured in the IDataAccessConfigurationView.
The user should be responsible of providing the proper type or interface for the returned provider or this method will fail.

This method will create the data provider and pass the connection string for the constructor.

Requirements

Target Platforms: Microsoft .NET Framework 2.0, Windows 2000, Windows XP, Windows Server 2003 family, Windows Server 2008 family, Windows Vista, Windows 7

See Also

Leadtools.Medical.DataAccessLayer requires a Medical toolkit server license and unlock key. For more information, refer to: Imaging Pro/Document/Medical Features