while working with linq query i’m receiving error
System.NullReferenceException: Object reference not set to an
instance of an object.
var db = from d in DepartmentBLL.GetDepartmentList()
join b in BudgetMasterBLL.GetBudgetMasterList()
on d.Departmentid equals b.Departmentid into leftJoin
from results in leftJoin.DefaultIfEmpty()
select new
{
Name = d.Name,
Create = results.Budgetmasterid == null ? "null": "value", //ERROR HERE
CreateURL = "frmBudgetInitial.aspx?departmentid=" + d.Departmentid.ToString() + "&departmentcategoryid=" + d.Departmentcategoryid.ToString()
};
I found some help on forum but did not solve my problem, please advise. thanks.,
try
or