Get repository instance used for wrapped constructor type repositories.

Namespace: MonoSoftware.LLBLGen
Assembly: MonoSoftware.LLBLGen (in MonoSoftware.LLBLGen.dll) Version: 1.0.40.661 (1.0.40.661)

Syntax

C#
public static T GetRepositoryInstance<T>()
where T : Repository
Visual Basic
Public Shared Function GetRepositoryInstance(Of T As Repository) As T
Visual C++
public:
generic<typename T>
where T : Repository
static T GetRepositoryInstance()
F#
static member GetRepositoryInstance : unit -> 'T  when 'T : Repository

Type Parameters

T
Repository type

Return Value

Type: T
Repository instance

Remarks

Returns an instance of the repository class, wraps the constructor to allow for encapsulated instatiation, so the logic in he constructor can be changed without changing the client code. Reference: http://www.netobjectives.com/ezines/ez0405NetObj_PerspectivesOfUseVsCreationInOODesign.pdf

See Also