How to ignore blank elements in linq query

Posted by Maestro1024 on Stack Overflow See other posts from Stack Overflow or by Maestro1024
Published on 2010-03-23T13:29:15Z Indexed on 2010/03/23 13:33 UTC
Read the original article Hit count: 443

Filed under:
|
|

How to ignore blank elements in linq query

I have a linq query

            var usersInDatabase =
            from user in licenseUserTable
            where user.FirstName == first_name &&
             user.LastName == last_name 
            select user;

But if I get here and first_name or last_name is blank then I want to still evaluate the other data item.

© Stack Overflow or respective owner

Related posts about LINQ

Related posts about linq-to-sql