Public Class InstitucionBusinessObject
    Inherits BusinessObject(Of Institucion)

#Region "Contructores"
    Public Sub New()
        MyBase.New()
        DbHelper = New InstitucionDbHelper
    End Sub

    Public Sub New(ByVal entity As Institucion)
        MyBase.New(entity)
        DbHelper = New InstitucionDbHelper
    End Sub

    Public Sub New(ByVal idInstitucion As String, Optional ByVal foreignLevel As Integer=0)
        Me.New()
        _Entity.idInstitucion = idInstitucion
        Dim Entity_Aux As Institucion = DbHelper.SelectEntity(_Entity,foreignLevel)
        If Not Entity_Aux Is Nothing Then
            _IsNew = False
            _Entity = Entity_Aux
        End If
    End Sub
#End Region

#Region "Metodos Estaticos"
    Protected Shared _Instance As InstitucionBusinessObject
    Protected Shared Function GetDdHelperInstance() As InstitucionDbHelper
        If _Instance Is Nothing Then
            _Instance = New InstitucionBusinessObject
        End If
    Return CType(_Instance.DbHelper, InstitucionDbHelper)
    End Function

    Public Shared Function GetListInstitucion(Optional ByVal foreignLevel As Integer=0) As EntityList(Of Institucion)
        Return GetDdHelperInstance.SelectList(foreignLevel)
    End Function

#End Region
End Class
