Solved

what is the not equal operator for linq to sql

Posted on 2009-05-12
3
7,179 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 250 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 250 total points
ID: 24364790
db.customers.Select(o => o.surname != "smith" || o.surname != "jones")
0

Featured Post

DevOps Toolchain Recommendations

Read this Gartner Research Note and discover how your IT organization can automate and optimize DevOps processes using a toolchain architecture.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
VB.NET (2008) - Refactoring Question 2 21
SQL Help 27 45
List<PaisEntity> - show some 1 24
Problem with SelectList in .NET MVC application 1 15
For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…

773 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