Imports dGen.Library.Enums.QueryEnums.QueryOperatorEnum
Imports dGen.Library.Enums.QueryEnums.CompareEnum
Public Class PlazaDbHelper
    Inherits DbHelper(Of Plaza, SqlDbType)

#Region "Metodos Generador"
    Public Function GetListPlazaByContratacion(ByVal idContratacion As Int32, Optional ByVal foreignLevel As Integer = 0) As EntityList(Of Plaza)
        Dim QueryObject = CreateQueryObject()
        QueryObject.CreateQuery(foreignLevel)
        QueryObject.Where(_None, _Equals).idContratacion = idContratacion
        Return QueryObject.ExecuteList()
    End Function

    Public Function GetListPlazaByConvocatoria(ByVal idConvocatoria As String, Optional ByVal foreignLevel As Integer = 0) As EntityList(Of Plaza)
        Dim QueryObject = CreateQueryObject()
        QueryObject.CreateQuery(foreignLevel)
        QueryObject.Where(_None, _Equals).idConvocatoria = idConvocatoria
        Return QueryObject.ExecuteList()
    End Function

    Public Function GetListPlazaByEstadoPlaza(ByVal idEstadoPlaza As Int32, Optional ByVal foreignLevel As Integer = 0) As EntityList(Of Plaza)
        Dim QueryObject = CreateQueryObject()
        QueryObject.CreateQuery(foreignLevel)
        QueryObject.Where(_None, _Equals).idEstadoPlaza = idEstadoPlaza
        Return QueryObject.ExecuteList()
    End Function

    Public Function GetListPlazaByProcesoEvaluacion(ByVal idProcesoEvaluacion As Int32, Optional ByVal foreignLevel As Integer = 0) As EntityList(Of Plaza)
        Dim QueryObject = CreateQueryObject()
        QueryObject.CreateQuery(foreignLevel)
        QueryObject.Where(_None, _Equals).idProcesoEvaluacion = idProcesoEvaluacion
        Return QueryObject.ExecuteList()
    End Function

    Public Function GetListPlazaBySTP_Municipio(ByVal idMunicipio As String, Optional ByVal foreignLevel As Integer = 0) As EntityList(Of Plaza)
        Dim QueryObject = CreateQueryObject()
        QueryObject.CreateQuery(foreignLevel)
        QueryObject.Where(_None, _Equals).idMunicipio = idMunicipio
        Return QueryObject.ExecuteList()
    End Function


#End Region
End Class
