用sql自带的函数ISNULL()
SELECT * FROM product WHERE Id=ISNULL(Id,'')
添加判断if (string.IsNullOrEmpty(id)) { id = " " }
string id='null';