• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 7696
  • 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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

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