Public Class ContadorAplicarPlazaBusinessObject
    Inherits BusinessObject(Of ContadorAplicarPlaza)

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

    Public Sub New(ByVal entity As ContadorAplicarPlaza)
        MyBase.New(entity)
        DbHelper = New ContadorAplicarPlazaDbHelper
    End Sub

    Public Sub New(ByVal idPlaza As Int32, Optional ByVal foreignLevel As Integer=0)
        Me.New()
        _Entity.idPlaza = idPlaza
        Dim Entity_Aux As ContadorAplicarPlaza = 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 ContadorAplicarPlazaBusinessObject
    Protected Shared Function GetDdHelperInstance() As ContadorAplicarPlazaDbHelper
        If _Instance Is Nothing Then
            _Instance = New ContadorAplicarPlazaBusinessObject
        End If
    Return CType(_Instance.DbHelper, ContadorAplicarPlazaDbHelper)
    End Function

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

    Public Shared Function GetListContadorAplicarPlazaByPlaza(ByVal idPlaza as Int32, Optional ByVal foreignLevel As Integer=0) As EntityList(Of ContadorAplicarPlaza)
        Return GetDdHelperInstance.GetListContadorAplicarPlazaByPlaza(idPlaza, foreignLevel)
    End Function

#End Region
End Class
