Rohan Ramani

Rohan Ramani

  • NA
  • 786
  • 145.8k

"Object reference not set to an instance of an object" LINQ join error

Dec 11 2020 2:52 AM
Hi All,
I am joining the tables using LINQ. I am getting the error while running "Object reference not set to an instance of an object" . Don't know where I am missing.
 
  1. var leadlist = from lead in _context.CallDetail.Include(z => z.OutCome).Where(x => x.IsDeleted != true).ToList()       join appoint in _context.AppointmentDetail on lead.CallId equals appoint.CallId into ledapp
  2.       from appoint in ledapp.DefaultIfEmpty() join allocateto in _context.UserMaster on appoint.RelationshipManagerId equals allocateto.UserId into ledAllocateTo 
  3.       from allocateto in ledAllocateTo.DefaultIfEmpty()  
 
 

Answers (2)