Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

what is the not equal operator for linq to sql

Posted on 2009-05-12
3
Medium Priority
?
7,406 Views
Last Modified: 2013-11-11
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
Comment
Question by:mugsey
3 Comments
 
LVL 13

Accepted Solution

by:
crazyman earned 1000 total points
ID: 24364625
!=
0
 

Author Comment

by:mugsey
ID: 24364701
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
 
LVL 12

Assisted Solution

by:GuitarRich
GuitarRich earned 1000 total points
ID: 24364790
db.customers.Select(o => o.surname != "smith" || o.surname != "jones")
0

Featured Post

Nothing ever in the clear!

This technical paper will help you implement VMware’s VM encryption as well as implement Veeam encryption which together will achieve the nothing ever in the clear goal. If a bad guy steals VMs, backups or traffic they get nothing.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Please read the paragraph below before following the instructions in the video — there are important caveats in the paragraph that I did not mention in the video. If your PaperPort 12 or PaperPort 14 is failing to start, or crashing, or hanging, …
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

963 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question