Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Using LINQ to query an entitylist
Message
De
04/05/2009 12:32:35
 
 
À
Tous
Information générale
Forum:
ASP.NET
Catégorie:
The Mere Mortals .NET Framework
Titre:
Using LINQ to query an entitylist
Divers
Thread ID:
01397790
Message ID:
01397790
Vues:
110
I’m trying to query and entitylist
Public Function CheckForDupe(ByVal itemid As String) As Boolean
Dim founditem As IEnumerable(Of VwRequistionQuickviewEntity) = From p In Me.EntityList Where p.ItemId.Trim = itemid.Trim Select p
If Not founditem Is Nothing Then
    If founditem.Count > 0 Then
           Return True
    End If
End If
Return False
I always get the following error
Object reference not set to an instance of an object.
StackTrace:
at NYSTAX.APPDEV.ICS.Business.VwRequistionQuickview._Closure$__1._Lambda$__1(VwRequistionQuickviewEntity p) in D:\Projects\ICS\ICSBusiness\VwRequistionQuickview\VwRequistionQuickview.Partial.vb:line 28
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Enumerable.Count[TSource](IEnumerable`1 source)
at NYSTAX.APPDEV.ICS.Business.VwRequistionQuickview.CheckForDupe(String itemid) in D:\Projects\ICS\ICSBusiness\VwRequistionQuickview\VwRequistionQuickview.Partial.vb:line 30

Any Idea what I’m doing wrong ?
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform