вы должны вернуть функцию самой карты, и вы можете достичь ее с помощью специальных функций стрелок es6
class Application extends React.Component {
constructor(){
super();
this.state = {
questionAnswer: 'is that possible',
question: ['is', 'possible', 'that']
}
}
renderKeywords() {
return this.state.question.map((item, i) =><span key={i}>{item}
</span>});
}
render() {
return (
<div>
<div>blabla</div>
{this.renderKeywords()}
</div>
);
}
}
React.render(<Application />, document.getElementById('app'));
Я отвечу на свой вопрос. Вы не делаете ссылку на System.Data.Entity для версии 6, чтобы получить DbExtensions. Вам нужно обратиться к самой EntityFramework и добавить с помощью System.Data.Entity в верхней части вашего cs-файла, и там появится .Include ().
Для EF 6.0 эти функции теперь доступны в System.Data.Entity.QueryableExtensions
в EntityFramework.dll
:
public static IQueryable Include(this IQueryable source, string path);
public static IQueryable<T> Include<T>(this IQueryable<T> source, string path);
public static IQueryable<T> Include<T, TProperty>(this IQueryable<T> source, Expression<Func<T, TProperty>> path);