
this query gives error:
Contact party =
(from c in myContext.cav_configurationSet
join p in myContext.ContactSet.DefaultIfEmpty()
on c.mm_name equals p.FullName
where c.mm_name == "TransactionPerformedBy" &&
c.StateCode == cav_configurationState.Active
select p).FirstOrDefault().ToEntity<Contact>();
I have checked it is due to there is no record or match for c.mm_name. please tell me how to fix it ?
thanks
*This post is locked for comments
I have the same question (0)Not having data do not through the error. Error probably is happening when you are using methods on null. Consider checking null before doing other operations.