i have records in two tables, and 1 object,
i want to retrieve data from both tables into 1 gridview, (both tables have same fields) i can not have joins because i need to show all rows
here is my code:
var query = from all in DB.Movies
where all.IsActive
select new MoviesObject
{
PhotoId = all.PhotoId,
Title = all.Title,
Description = all.ShortDescription
};
var querytwo = from all in DB.movieslisttwo
where all.IsActive
select new MoviesObject
{
PhotoId = all.PhotoId,
Title = all.Title,
Description = all.ShortDescription
;
return query.ToList();
Alternatively, you can call
.Union()to skip duplicates.