I have use this query for get data from three table .But i have null Not record found issue.
var Fav = (from FV in _context.TblFavUserVideo
join VM in _context.TblVideoMaster on FV.CategoryId equals VM.CategoryId
join EV in _context.TblEducationalVideo on FV.EducationalVideoId equals EV.EducationalId
where FV.UserId == obj_parameter.UserId && VM.VideoFavStatus== Convert.ToBoolean(1) && FV.EdcuationalVideoStatus == Convert.ToBoolean(1)
select new
{
FV.FavId,
//FV.FileId,
FV.UpdatedDate,
VM.FilePath,
EV.VideoPath,
EV.ImagePath,
EV.EducationalId
}).ToList();
if (Fav.Count > 0)
Jenith ThakkarPosted Aug 19, 2020, 8:08 AM
Might be condition is not fulfilled your requirement
this linq query represent inner join between three tables so it shows like
Table 1---Join---> Table2
Table 1---Join---> Table3
So if any of this condition has a no records then it will gives you 0 records
So my advice is based on your requirement use left join, right join instead of inner join