What does this mean? Ignore the return, and the get, The results will be flattened and stuck in the application mem (so this will be a set… probably)
"Could not find an implementation of the query pattern for source type 'System.Linq.IQueryable'. 'Join' not found. Consider explicitly specifying the type of the range variable 'a'."
private CommonDataResponse toCommonData
{
get
{
CommonDataResponse toCommonData = this.gatewayReference.GetCommonData();
Array dCountries = toCommonData.PropertyCountries.ToArray(); //Webservice sends KeyValuePairOfString
Array dRegions = toCommonData.Regions; //Webservice sends Array
Array dAreas = toCommonData.Areas; //Webservice sends Array
var commonRAR = from a in dAreas
join r in dRegions
on a.RegionID equals r.Id
join c in dCountries
on r.CountryCode equals c.Key
select new {c.Value, r.Name, a.Name, a.Id };
return toCommonData;
}
}
dRegions/dAreas Both arrays, dCountries is .toArray()
Best Answer
Array
is a very loose type, and doesn't implementIEnumerable<T>
etc. You could try just switching theArray
lines tovar
(let the compiler pick the type). If it still usesArray
, then perhaps use.Cast<T>()
to specify the type (orArray.ConvertAll
, etc).From
Array
(without more information) all it knows isobject
.Basically,
Join
is defined (as an extension method) onIEnumerable<T>
andIQueryable<T>
- notIEnumerable
(without the<T>
).