Problem with nested lambda expressions.
- by Lehto
Hey
I'm trying to do a nested lambda expression like to following:
textLocalizationTable.Where(
z => z.SpokenLanguage.Any(
x => x.FromCulture == "en-GB")
).ToList();
but i get the error:
Member access 'System.String FromCulture' of
'DomainModel.Entities.SpokenLanguage' not legal on type
'System.Data.Linq.EntitySet`1[DomainModel.Entities.SpokenLanguage].
TextLocalization has this relation to spokenlanguage:
[Association(OtherKey = "LocalizationID", ThisKey = "LocalizationID", Storage = "_SpokenLanguage")]
private EntitySet<SpokenLanguage> _SpokenLanguage = new EntitySet<SpokenLanguage>();
public EntitySet<SpokenLanguage> SpokenLanguage
{
set { _SpokenLanguage = value; }
get { return _SpokenLanguage; }
}
Any idea what is wrong?