Using EF how do i access values in a parent property when accessing a list of child objects.
i.e. I have a Project object and Timesheet object
Project
Id
Name
...
TimeSheet
ProjectId
UserId
Date
TimeSpent
...
I understand how to get back a Project and its related Timesheets but what if I want to get back all of the timesheets for a given user and then simply display the project name with each timesheet record.
e.g. ProjectName, Date, TimeSpent
Is it best practice to create a new entity to shape that result set or should i just be able to return IEnumerable and get access to the .Project.Name field.
This is super easy using Linq to Sql or just straight up ADO.net/SPs etc but Its killing me on EF..
Any ideas?