Linq orderby problem

linq , linq to sql , linq queries Malta
  • 10 years ago

    Hello there,

    Is the following possible?

    I have a linq to SQL query that is returning products ordered by price.

    An example of the data:

    A = 2.0

    b = 3.0

    C = 0.0

    D = 5.5

    I would like to order by price but only for the items which are not set to 0. therefore the desired result would be

    A = 2.0

    b = 3.0

    D = 5.5

    C = 0.0

    and not

    C = 0.0

    A = 2.0

    b = 3.0

    D = 5.5

    Many thanks !

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).

Contribute

Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“A computer is a stupid machine with the ability to do incredibly smart things, while computer programmers are smart people with the ability to do incredibly stupid things. They are, in short, a perfect match” - Bill Bryson