各位大哥,小弟想问下在 sql中的 where coulumn is null这个语句用linq应该怎么写,急用
------解决方案--------------------
- C# code
//可空类型用 Nullable<T>.Equals //如:public int? Currency_User_ID where Nullable<int>.Equals(e.Currency_User_ID,变量) //引用类型用Nullable.Equals。 //public string Currency_User_ID where Nullable.Equals(e.Currency_User_ID, 变量)
------解决方案--------------------
------解决方案--------------------
- C# code
var query = from t in T where string.IsNullOrEmpty(t.CURRENCY_USER_ID.ToString()) == true | Convert.ToInt32(t.CURRENCY_USER_ID)==42 select t;
------解决方案--------------------
where vt.Currency_User_ID == curr.USER_ID || vt.Currency_User_ID.value ==null