Ma méthode d'extension est:LINQ to SQL et la méthode d'extension dans la sous-requête
public static IEnumerable<T> FilterCultureSubQuery<T>(this Table<T> t)
where T : class
{
return t;
}
J'ai essayé de l'utiliser dans cette requête
var test = from p in t.Products
select new
{
Allo = p,
Allo2 = (from pl in t.ProductLocales.FilterCultureSubQuery()
select pl)
};
Ce qui est censé être la signature de ma méthode extension? Je reçois toujours cette erreur:
Method 'System.Collections.Generic.IEnumerable`1[ProductLocale] FilterCultureSubQuery[ProductLocale](System.Data.Linq.Table`1[ProductLocale])' has no supported translation to SQL.
J'ai aussi essayé cette signature:
public static IQueryable<T> FilterCultureSubQuery<T>(this Table<T> t)
where T : class
{
return t;
}
Et je suis arrivé cette erreur:
Method 'System.Linq.IQueryable`1[ProductLocale] FilterCultureSubQuery[ProductLocale](System.Data.Linq.Table`1[ProductLocale])' has no supported translation to SQL.
Merci