Thanks for replying~
Yes, I know, and also I could use :
var res=from ....where ....select .
via from & where & select , it won't throw exception if the record doesn't exist.
but since microsoft provide lambda, and lambda is simpler, I want to use lambda if possible,
now .... I think this is unbelivable , isn't it useless?
naturehermit:
Get an sqldatareader.
and then use
imagine a reader object and command object
reader = cmd.ExecuteDataReader
if (reader.Read())
//Do stuff
it will only work if there is data.