My extension method:
public static IEnumerable<T> FilterCultureSubQuery<T>(this Table<T> t)
where T : class
{
return t;
}
I tried using it in this query
var test = from p in t.Products
select new
{
Allo = p,
Allo2 = (from pl in t.ProductLocales.FilterCultureSubQuery()
select pl)
};
What should be the signature of my method extension? I always get this error:
Method 'System.Collections.Generic.IEnumerable`1 [ProductLocale] FilterCultureSubQuery [ProductLocale] (System.Data.Linq.Table`1 [ProductLocale])' has no supported translation to SQL.
I also tried this signature:
public static IQueryable<T> FilterCultureSubQuery<T>(this Table<T> t)
where T : class
{
return t;
}
And I got this error:
Method 'System.Linq.IQueryable`1 [ProductLocale] FilterCultureSubQuery [ProductLocale] (System.Data.Linq.Table`1 [ProductLocale])' has no supported translation to SQL.
thanks
source
share