2
Answers

Databindings with Entity Framework

doomed morale

doomed morale

14y
2.2k
1

Hi,
I've got two tables in my entity Model:


Author: AuthorID, FirstName, LastName   and
Article: ArticleID, Title, Body, AuthorID.
I've got also DataGridView with 'Context.Articles' as it's datasource. I've binded Textbox text property with "Title" column of Article table. That work fine.
But what sholud I do to show FirstName value of table Author in my second textBox when I'm moving throught DataGridView ? When I bind this TextBox with Author table there's always the same value (from first row of Author table). Should I use some entity relations or something ?
I'de gratefull for few sample code lines :)
regards,
Answers (2)