• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7468
  • Last Modified:

what is the not equal operator for linq to sql

What is the "not equal" operator in a linq to sql select statement

Say I have something like...

db.customers.Select(o => o).Where(o => o.surname ... DOES NOT EQUAL "SMITH"

What is the property syntax
0
mugsey
Asked:
mugsey
2 Solutions
 
crazymanCommented:
!=
0
 
mugseyAuthor Commented:
OK thanks so what would be the syntax above to include the OR (||)  operator ?

db.customers.Select(o => o).Where(o => o.surname != "smith")  OR != "jones"??

0
 
GuitarRichCommented:
db.customers.Select(o => o.surname != "smith" || o.surname != "jones")
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now