我在两个表和 1 个对象中有记录,我想将两个表中的数据检索到 1 个网格视图中,(两个表都有相同的字段)我不能有连接,因为我需要显示所有行
这是我的代码:
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();