How to select with Linq to Entity from one table with two different variables?
Posted
by George
on Stack Overflow
See other posts from Stack Overflow
or by George
Published on 2010-05-01T18:04:38Z
Indexed on
2010/05/01
18:07 UTC
Read the original article
Hit count: 142
linq-to-entities
I have a table where I have items under two different types as you can see below: How can I select from this table with Linq to Entity to get the result with two variables?
where ItemType = Type1 and ItemType == Type2
.... select new {typeOne == "", typeTwo == ""};
ID ItemName ItemType
1 ItemOne Type1
2 ItemTwo Type1
3 ItemThree Type1
4 ItemFour Type1
5 ItemTFive Type2
6 ItemSix Type2
7 ItemSeven Type2
8 ItemEight Type2
© Stack Overflow or respective owner