Query error using Entity Framework with Mysql and VB.net

Asked

Viewed 14 times

1

I have developed a method to do with simple query provided by the Changed textbox event and the query returns the right 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 even. I tried everything. Someone can help me. The code is below.

Public Shared Function Busca_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
No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.