I have 2 classes
Public Class Shipper Public Property ShipperID As Long Public Property CreateDate As DateTime Public Property ShipperCode As String Public Property ShipperName As String Public Property ShippingMethods As List(Of ShippingMethod) Public Class ShippingMethod Public Property ShippingMethodID As Long Public Property ShipperID As Long Public Property CreateDate As DateTime Public Property ShipppingMethod As String Public Property ShipppingMethodCode As String
I am trying to find the sender list where shippercode is empty and ShipperName is not empty - I got this
Dim oListShipper As List(Of Shipper) = GetAllShippers() Dim oListShipperRet As List(Of Shipper) = _ oListShipper.FindAll(Function(c) (c.ShipperCode = "" And _ c.ShipperName <> ""))
Now, how to get all senders where ShippingMethod.ShipppingMethodCode = '' and ShippingMethod.ShipppingMethod <> ''
I tried
oListShipper.FindAll(Function(c) (c.ShipperCode = "" And _ c.ShipperName <> "")) Or _ (c.ShippingMethods.FindAll(Function(d) d.ShipppingMethodCode = "" And _ d.ShipppingMethod <> "").Count > 1)))
But it didn’t work out. Any idea?
Thanks Jothish
source share