Hi,
As far I can understand that's a problem of tight couple.
What you can do....
public interface IFilterable
{
object Filter();
}
implement the same in you Entity Class and then Call Filter Function from your DataFilter Layer
[Update]
public interface IFilterable
{
object Filter();
}
public abstract class EntityRepo<T> : IFilterable
{
public virtual object Filter()
{
return null;
}
}
public class EmpRepo : EntityRepo<EntityEmp>
{
public object Filter()
{
return new List<EntityEmp>();
}
}
public class EntityEmp : IFilterable
{
public int ID { get; set; }
public string Name { get; set; }
}
public class FilterData
{
public IEnumerable< T> GetFilteredData<T>(IFilterable Fltr)
{
return (IEnumerable<T>)Fltr.Filter();
}
}
I think it will help you...