Hi All,
I do an initial linq statement that in this scenario :
That returns a set of 11 address'sCode:var locationBuilding = from location in locationBuildings.LocationBuildings select location;
Later, I attempt to filter to obtain a single address from this set using :
In general this gives me the results I want. However, on occassions I need to reverse this search.Code:locationBuilding = from location in locationBuildings.LocationBuildings where location.LocationName.Contains(Row["RISKADDRESS"].ToString()) select location;
i.e.
my Row["RiskAddress"] contains the value: 32 my street, my town,
but my set that I'm filtering on holds a value: 32 my street, my town
So of course my filter returns 0 records because of the trailing comma, so in cases were the returning count is 0 I want to say return me the address from the list that is like Row["RiskAddress"].




Reply With Quote