SELECT isNull(Qty,0) FROM BillMain
var result = from b in BillMain select new { Qty =b.Qty ?? 0 }
from c in dtx.Categories where c.CategoryId == CatId && (string.IsNullOrEmpty(param1) || c.Param1 == param1) && (string.IsNullOrEmpty(param2) || c.Param2 == param2) select c
var result= from b in BillMain select new{Qty=(b.Qty==DBNull.value ? 0:b.Qty)}
var orders = from o in db.Orders select new { OrderID = o.OrderID == DBNull.Value ? 0 : o.OrderID, //Checking for null value and passing 0 if null o.CustomerID, o.EmployeeID, o.ShippedDate }
YourContext db = new YourContext(); List<entity> list = (from n in db.YourEntity where n.FieldToCheck.Equals(null) select n).ToList();
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)