How to brings the Entity Framework Include extention method to a Generic IQueryable<TSource>
问题 Here's the thing. I have an interface, and I would to put the Include extension method, who belongs to EntityFramework library, to my IRepository layer wich dont needs to knows about EntityFramework . public interface IRepository<TEntity> { IQueryable<TEntity> Entities { get; } TEntity GetById(long id); TEntity Insert(TEntity entity); void Update(TEntity entity); void Delete(TEntity entity); void Delete(long id); } So I have the extension method: public static class IncludeExtension { static