I have get record from three table using linq c# .it's working fine but i have face issue i want to get record based on id and status .I have use this query
- var Fav = (from FV in _context.TblFavUserVideo
- join VM in _context.TblVideoMaster on FV.FileId equals VM.FileId into VMs
- from VM in VMs.DefaultIfEmpty()
- join EV1 in _context.TblEducationalVideo on FV.EducationalImageId equals EV1.EducationalId into EV1s
- from EV1 in EV1s.DefaultIfEmpty()
- join EV in _context.TblEducationalVideo on FV.EducationalVideoId equals EV.EducationalId into EVs
- from EV in EVs.DefaultIfEmpty()
- where FV.UserId == obj_parameter.UserId && FV.IsFav== obj_parameter.Status || VM.VideoFavStatus == true || FV.SubCategoryVideoFavStatus == true || FV.EdcuationalImageStatus == true || FV.EdcuationalVideoStatus == true
- select new
- {
- FV.FavId,
- FV.IsFav,
- FV.UserId,
- FV.SubCategoryVideoFavStatus,
- FV.EdcuationalVideoStatus,
- FV.EdcuationalImageStatus,
- FV.UpdatedDate,
- VM.FilePath,
- VM.VideoTitle,
- VM.VideoDescription,
- EV.Title,
- EV.Description,
- EV1.ImagePath,
- ImageTitle = EV1.Title,
- Desc = EV1.Description,
- EV.EducationalId,
- EV.VideoPath
- }).ToList();
- I will send
- {
- "UserId":37,
- "Status":1
- }
this param .But here all record showing for e.g total 80 record in my table loop are 80 time run.So my api very late response .Please resolve this issue