Can anyone convert this SQL query to linq query ----select *from xxxxxxxxxxxxxxxxx order by case when a=5 then a end desc, case when b=10 then b end desc
-
-
Answer:
Can you try the below query : var q = from table in xxxxxxxxxxxxxxxxx select table; if(a==5) q = q.OrderByDescending(t=>t.a) if(b==10) q = q.OrderByDescending(t=>t.b)
Dharmendra Kumar at Quora Visit the source
Related Q & A:
- How to convert my SQL query to MS Access query?Best solution by Stack Overflow
- How to convert a SQL query into hibernate criteria?Best solution by Stack Overflow
- How to convert SQL query to LINQ query?Best solution by Stack Overflow
- How can I convert the query from SQL to LINQ?Best solution by Stack Overflow
- Where can I find a small end 4 pin fire wire and a 5 pin mini usb 2.0 cable that connects a external harddrive?Best solution by Yahoo! Answers
Just Added Q & A:
- How many active mobile subscribers are there in China?Best solution by Quora
- How to find the right vacation?Best solution by bookit.com
- How To Make Your Own Primer?Best solution by thekrazycouponlady.com
- How do you get the domain & range?Best solution by ChaCha
- How do you open pop up blockers?Best solution by Yahoo! Answers
For every problem there is a solution! Proved by Solucija.
-
Got an issue and looking for advice?
-
Ask Solucija to search every corner of the Web for help.
-
Get workable solutions and helpful tips in a moment.
Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.