I am trying to select
everything from a table and then make a join with two other tables, from which I need just some of the columns. The final list will be populated into a DevExpress GridControl
. The main table that I take the data from has these columns:
Id | ScheduleId | AccountId | Description
I can easily select everything from this table and return. Here is my list:
public IList<StatusDescription> getStatusDescription()
{
var listOfItems = from e in context.StatusDescription select e;
return listOfItems.ToList<StatusDescription>();
}
The other two tables are Schedules and Accounts, they look as follows:
Id | ScheduleName | DateFrom | DateTo
and
Id | AccountName | AccountCode
I would like to join the DateFrom
and DateTo
from the Schedule
table and the AccountCode
from the Account
table. Is it possible to get all that into a single list. I can easily bind it later to the GridControl