Solved

How to use "and " operator in where clause using LINQ

Posted on 2009-04-01
2
436 Views
Last Modified: 2013-11-11
i need LINQ query like this

select * from tablename where col1 = value and col2 = value
0
Comment
Question by:ravindra333
  • 2
2 Comments
 
LVL 21

Accepted Solution

by:
naspinski earned 500 total points
ID: 24037154

var results = from p in DataContext.tablename where col1 == value && col2 == value select p;

Open in new window

0
 
LVL 21

Expert Comment

by:naspinski
ID: 24037376
Curious to why this didn't get an A?  I answered your exact question...
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

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

Suggested Solutions

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…
A long time ago (May 2011), I have written an article showing you how to create a DLL using Visual Studio 2005 to be hosted in SQL Server 2005. That was valid at that time and it is still valid if you are still using these versions. You can still re…
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…
With Secure Portal Encryption, the recipient is sent a link to their email address directing them to the email laundry delivery page. From there, the recipient will be required to enter a user name and password to enter the page. Once the recipient …

831 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