none
reverse query (descending) RRS feed

  • Question

  • Hello

    how i can get the data from the database descending 

            public IQueryable<Product> GetProduct([QueryString("productID")] int? productId)
            {
                var _db = new WingtipToys.Models.ProductContext();
                    IQueryable<Product> query = _db.Products;
                    if (productId.HasValue && productId > 0)
                    {
                        query = query.Where(p => p.ProductID == productId);
                    }
                    else
                    {
                        query = null;
                    }
                    return query;
            }

    Friday, September 26, 2014 12:29 AM

Answers

  • Might try over here.

    Microsoft ASP.Net forums

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Friday, September 26, 2014 1:51 AM
    Moderator

All replies

  • Might try over here.

    Microsoft ASP.Net forums

     

     

     


    Regards, Dave Patrick ....
    Microsoft Certified Professional
    Microsoft MVP [Windows]

    Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.

    Friday, September 26, 2014 1:51 AM
    Moderator
  • what i have to try exactly 
    sry 
    but i am still beginner so i just want something clear to understand  thank you ! 
    Friday, September 26, 2014 12:54 PM
  • Hello,

    Dave's suggesting that you ask on Microsoft's ASP.Net forums.

    Specifically, This should be asked in Microsoft's ASP.Net C# forum:

    http://forums.asp.net/37.aspx/1?C+

    As Microsoft's ASP.Net forums are on a different platform, we cannot move the question for you.

    Karl


    When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
    My Blog: Unlock PowerShell
    My Book: Windows PowerShell 2.0 Bible
    My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}})

    Friday, September 26, 2014 3:35 PM
    Moderator