I m trying to write a LINQ 2 SQL query wuth left our joins.But when executing i am getting the below exception
The null value cannot be assigned to a member with type System.Byte which is a non-nullable value type
My LINQ 2 SQL Query is here
Dim items = (From i In oRecelDB.IV00200s _
Group Join c In oRecelDB.MDS_CONTAINERs _
On c.CONTAINERBIN Equals i.BIN Into ic = Group From x In ic.DefaultIfEmpty() _
Group Join sop In oRecelDB.SOP10201s _
On i.SERLNMBR Equals sop.SERLTNUM And i.ITEMNMBR Equals sop.ITEMNMBR _
Into os = Group From y In os.DefaultIfEmpty() _
Group Join iv1 In oRecelDB.IV10002s _
On iv1.SERLTNUM Equals i.SERLNMBR And iv1.ITEMNMBR Equals i.ITEMNMBR _
Into iv2s = Group From z In iv2s.DefaultIfEmpty() _
Where i.SERLNMBR = "2323" _
Select Bin = i.BIN, i.ITEMNMBR, i.LOCNCODE, i.DATERECD, i.SERLNMBR, i.SERLNSLD _
, YPosted = y.POSTED).ToList()
I understand that the value inside the y.POSTED is coming as null might be the reason.How can i handle that ? Any thoughts ? Thanks in advace