public IQueryable <TEntity> Where(Expression <Func <TEntity, bool> > predicate, params string[] navigationProperties) { IEnumerable <TEntity> list; using (var ctx = new TeamBuilderContext()) { var query = ctx.Set <TEntity>().AsQueryable(); foreach (string navigationProperty in navigationProperties) { query = query.Include(navigationProperty);//got to reaffect it. } list = query.Where(predicate).ToList <TEntity>(); } return(list.AsQueryable()); }