Query error using Entity Framework with MySQL and VB.net

1

I have developed a method to do with simple query indexed by the Changed event of textbox and the query returns the correct values the first time. When I change the value of the component and the query is requested again with a new code, the result is the same. I tried everything already. Can someone help me. The code is below.

Public Shared Function Search_CQGusaLiq (ID_MatPri As Integer) As ArrayList

    Dim ArrLst As ArrayList = New ArrayList

    Dim Q_MatGusLiq As IQueryable(Of TB_MateriaPrima_ThermoLD) = (From p In EF_SSThermoLD.TB_MateriaPrima_ThermoLD 
                                                                  Where p.ID_MatPrima = ID_MatPri
                                                                  Select p)

    Dim CQSelecionada As List(Of TB_MateriaPrima_ThermoLD) = Q_MatGusLiq.ToList()

    If CQSelecionada.Count > 0 Then

        For Each n In CQSelecionada
            ArrLst.Add(n.TeorC)
            ArrLst.Add(n.TeorMn)
            ArrLst.Add(n.TeorSi)
            ArrLst.Add(n.TeorP)
            ArrLst.Add(n.TeorS)
            ArrLst.Add(n.TeorFe)
            Exit For
        Next

    End If

    Return ArrLst

End Function
    
asked by anonymous 27.07.2017 / 01:35

0 answers