I am trying to evaluate numbers for 0 before I divide the numbers in the linq query.
I know how to do a select case in a stored procedure but can't figure out how to do it in code behind VB.Net.
How do I check numbers for values of 0?
Dim q = (From a In dc.ProductDetails Where a.ProductDetailID = iItemID _
Select New curstock = if((a.OuncesInStock = 0,a.OuncesInStock, 0) / if(a.OuncesPerItem = 0, 1))).FirstOrDefault