+4  A: 
query.Single()   

That's it.

leppie
Be careful about using Single, it throws exception if items.Count!=1. From MSDN : "Returns the only element of a sequence, and throws an exception if there is not exactly one element in the sequence."
Amby
+4  A: 
id = (from m in stock.StockTools
                      from ss in stock.RefStockStatus
                      where (m.statusid == 3 || m.statusid == 5) &&
                      ss.id == m.statusid && m.id == ItemID
                      select m.id).FirstOrDefault();
MarkB29
+1  A: 

if you want to retrieve a single result user FirstOrDefault() or First().

If you use First() and the result is null.It will throws exception but not in FirstOrDefault().

var query = (from m in stock.StockTools
                      from ss in stock.RefStockStatus
                      where (m.statusid == 3 || m.statusid == 5) &&
                      ss.id == m.statusid && m.id == ItemID
                      select m.id).FirstOrDefault();
anishmarokey
+1  A: 

Just for variety...

query.Take(1)    
Amby
But that returns an enumerable.
Ryan