Linq orderby problem

linq , linq to sql , linq queries Malta
  • 7 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.

“If debugging is the process of removing software bugs, then programming must be the process of putting them in.” - Edsger Dijkstra