I have two similar tables which have data I need to display in a single grid. As each table has slightly different fields, I decided to extract the data I need into a generic object that I can bind to the grid. Shown below are the expressions I am using. My question is, how can I modify or add code so that I can get a single list that I can bind to. I guess something along the lines of “var jobs = jobs1 + jobs 2” etc.
var jobs1 = from j in ctx.MyImport.Include("MyMethod").Include("MySchedule")
select new
{
FileName = j.ImportFileName,
Name = j.Name,
ID = j.ImportID
};
var jobs2 = from j in ctx.MyExport.Include("MyMethod").Include("MySchedule")
select new
{
FileName = j.ExportFileName,
Name = j.Name,
ID = j.ExportID
}