LINQ 101 question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Mike P

    LINQ 101 question

    I am working through the LINQ 101 examples and have found another bug,
    on SelectMany From Assignment. Can anybody tell me what the correct
    syntax should be :

    var orders =
    from c in customers
    from o in c.Orders
    total = o.Total
    where total >= 2000.0M
    select new {c.CustomerID, o.OrderID, total};



    *** Sent via Developersdex http://www.developersdex.com ***
  • Martin Honnen

    #2
    Re: LINQ 101 question

    Mike P wrote:
    I am working through the LINQ 101 examples and have found another bug,
    on SelectMany From Assignment. Can anybody tell me what the correct
    syntax should be :
    >
    var orders =
    from c in customers
    from o in c.Orders
    total = o.Total
    where total >= 2000.0M
    select new {c.CustomerID, o.OrderID, total};
    I am not familiar with that sample but it is likely that it should be
    let total = o.Total
    instead of the
    total = o.Total


    --

    Martin Honnen --- MVP XML

    Comment

    Working...