Wednesday 15 June 2011

vb.net - Sort blank entries to bottom of LINQ query -


I am trying to sort the SQL query with LINQ based on two fields. The first area is sometimes a tap that automatically goes to the top of an ascending query. Is there any way to make Zero entries like that?

Here's an example:

  SampleDataContact.Exchange x to x command, x.Sequence_Number _x.Date, x.Sequence_Number  
  • 12/2/09, 5
  • 12/3/09, 2

    Desired order:

    • 12/2/09, 5
    • 12 / 3/09, 2
    • 12/3/09, 3
    • Zero, 1
    • NULL, 4

      If they are string:

       by  order (string.IsNullOrEmpty (x.Date)? " Zzzzzz ": x.Date)  

      If they are spaces:

        to order (x. Date? Datetime.maxvalue)  

  • No comments:

    Post a Comment