Hi,
I have an entity which I have fetched from the database, along with a lot of the related data which I specified by using a couple of prefetch paths. My graph looks like this
Checklist -> 1:N -> Questions -> 1:1 Question_Response
So my checklist entity has many questions, each of which have a single response. Data retrieval is fine
So, I need to display all the questions in the asp.net page, along with the response. I have added a repeater and databound to the EntityCollection of Questions, but this only gives me access to the Question entities, like this:
<label>Question:</label>
<%# Eval("QuestionText") %>
What I then want to do is display the answer, but I don't know how to do this.. I need to tell the repeater to get it from the underlying Querstion's related answer, but I don't know an easy way to do this - all I can think of is to code it all manually in the OnItemDataBound like this ;-
{
myResponseLabel.Text = thisQuestion.Response.Answer;
.. and so on for other fields
}
Is this the only option I have, or is there a nice simple way to get this done ?
Thanks all!