Microsoft LINQ Books

Programming Microsoft LINQ & Introducing Microsoft LINQ
Welcome to Microsoft LINQ Books Sign in | Join | Help
in Search

Contradiction between pages 74 and 87?

Last post 12-27-2007, 9.34 by Marco.Russo. 1 replies.
Sort Posts: Previous Next
  •  12-27-2007, 6.09 86

    Contradiction between pages 74 and 87?

    P. 74 says "Every query starts with a from clause and ends with either a select or a group clause." But on p. 87 there is an example query that ends with a Join clause.  Is p. 74 wrong then?

  •  12-27-2007, 9.34 87 in reply to 86

    Re: Contradiction between pages 74 and 87?

    Hi Rickee,

    thanks for your message!

    The examples on page 87 makes direct calls to LINQ operators through the syntax of extension methods. The statement on page 74 refers only to query expressions in C#, which are written with the syntax:

    from c in customers
    where c.City = "London"
    select c.CompanyName;

    In that case you use a special syntax of the language that is converted by the compiler into extension methods calls of a LINQ class. That query syntax start with a from and ends with either a select or group clau. When you use the direct call to extension methods, you can end the query with any operator.

    I hope it is more clear now, however write us if you still have some doubt.

    Marco

View as RSS news feed in XML
Powered by Community Server (Personal Edition), by Telligent Systems