linq query - The method or operation is not implemented.
- by Dejan.S
I'm doing the Rob Conery mvc storefront and at one place I'm suppose to get categories but I get an error with this linq query and I can not get why. It's exactly the same as his.
var culturedName = from ct in ReadOnlyContext.CategoryCultureDetails
where ct.Culture.LanguageCode == System.Globalization.CultureInfo.CurrentUICulture.TwoLetterISOLanguageName
select new
{
ct.CategoryName,
ct.CategoryId
};
return from c in ReadOnlyContext.Categories
join cn in culturedName on c.CategoryId equals cn.CategoryId
select new Core.Model.Category
{
Id = c.CategoryId,
Name = cn.CategoryName,
ParentId = c.ParentId ?? 0,
Products = new LazyList<Core.Model.Product>(from p in GetProducts()
join cp in ReadOnlyContext.Categories_Products on p.Id equals cp.ProductId
where cp.CategoryId == c.CategoryId
select p)
};
its the return query that mess things up. I have checked and the culturename actually gets data from the database. Appricate your help