Pl disregard, sorry.
Justin
Hey, just a quick q on the embedded Databinding syntax for the Accordion (i.e. <Content><%# DataBinder.Eval(Container.DataItem, "mysteryString")%></Content> )
What is the second arg for Eval if my server code is:
categoriesAccordion.DataSource = ProductsEntity.SecondaryCategories("Bread");
categoriesAccordion.DataBind();
...and in ProductsEntity ...
private static readonly Func<Quickshop35sp1, string, List<string>>
SecondaryCategoriesCompiledLinq = CompiledQuery.Compile
((Quickshop35sp1 qs35sp1, string primaryCategory) =>
(from prod in qs35sp1.ProductsSet
where prod.CategoryPrimary == primaryCategory
group prod by prod.CategorySecondary into grp
select grp.Key).ToList());
public static List<string> SecondaryCategories(string categoryPrimary)
{
Quickshop35sp1 qs35sp1 = new Quickshop35sp1();
List<string> secondaries = SecondaryCategoriesCompiledLinq.Invoke(qs35sp1, categoryPrimary);
return secondaries;
}
The error I'm getting is 'LINQ to Entities does not recognize the method 'System.Collections.Generic.List`1[System.String] ToList[String](System.Collections.Generic.IEnumerable`1[System.String])' method, and this method cannot be translated into a store expression.'. There's nothing wrong with the LINQ query, it's the last bit 'cannot be translated', and I think if the 2nd arg for DataBinder.Eval was right, it'd be fine.
Appreciate any help,
Justin.