I Have 3 entities.
Product
LangID
ProductName
Category
LangID
CatName
ProductType
LangID
TypeName
As you can see, each of them has LangID Property.
I Would like be able to create a generic repository that will contain only one function that will return an Func<T, bool> GetLmbLang()
public interface IBaseRepository<T> where T : class
{
Func<T, bool> GetLmbLang();
}
public class BaseRepository<T> : IBaseRepository<T> where T : class
{
public Func<T, bool> GetLmbLang()
{
//ERROR HERE
//That dosen't work here
return (p => p.LangID == 1);
}
}
Someone has an idea ???.