Problem with nested lambda expressions.
Posted
by Lehto
on Stack Overflow
See other posts from Stack Overflow
or by Lehto
Published on 2010-03-16T16:20:57Z
Indexed on
2010/03/22
14:01 UTC
Read the original article
Hit count: 330
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?
© Stack Overflow or respective owner