When you do
var query = from p in db.xxx
select p;
Let's say there are two fields
FirstName and LastName
From above Query
Query.FirstName and Query.LastName are returned.
Let's say FirstName is an empty field but not Null.
LastName is Null;
FirstName is equal to both Null and string.empty.
LastName is equal to string.empty.
thus either null or string.empty can be == to string.empty
so... you can do
if ( query.FirstName == string.empty) { }
if ( query.LastName == string.empty) { }
Sunday, June 29, 2008
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment