Solved

what is the not equal operator for linq to sql

Posted on 2009-05-12
3
7,141 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Suggested Solutions

Welcome my friends to the second instalment and follow-up to our Minify and Concatenate Your Scripts and Stylesheets (http://www.experts-exchange.com/Programming/Languages/.NET/ASP.NET/A_4334-Minify-and-Concatenate-Your-Scripts-and-Stylesheets.html)…
This document covers how to connect to SQL Server and browse its contents.  It is meant for those new to Visual Studio and/or working with Microsoft SQL Server.  It is not a guide to building SQL Server database connections in your code.  This is mo…
Internet Business Fax to Email Made Easy - With eFax Corporate (http://www.enterprise.efax.com), you'll receive a dedicated online fax number, which is used the same way as a typical analog fax number. You'll receive secure faxes in your email, fr…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.

708 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now