Solved

what is the not equal operator for linq to sql

Posted on 2009-05-12
3
7,248 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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

Space-Age Communications Transitions to DevOps

ViaSat, a global provider of satellite and wireless communications, securely connects businesses, governments, and organizations to the Internet. Learn how ViaSat’s Network Solutions Engineer, drove the transition from a traditional network support to a DevOps-centric model.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
I need help writing Unit Tests for my ASP.Net MVC application 5 39
search by any word in column 5 29
Error in Visual Project 10 46
What is GIS method of Geometry data type? 6 31
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
Exchange organizations may use the Journaling Agent of the Transport Service to archive messages going through Exchange. However, if the Transport Service is integrated with some email content management application (such as an antispam), the admini…
Finding and deleting duplicate (picture) files can be a time consuming task. My wife and I, our three kids and their families all share one dilemma: Managing our pictures. Between desktops, laptops, phones, tablets, and cameras; over the last decade…

739 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