Interview Question

SharePoint Developer/Consultant Interview

Write an example LINQ (preferably using LINQ to SharePoint

  ) query on the whiteboard
Answer

Interview Answer

1 Answer

0

// Query for customers from London
var londonCustomers = from customer in Customers
                      where customer.City == "London"
                      select customer;

Notice how the select statement appears at the bottom of the query. I don't like this syntax, but that is one way it differs from SQL.

here is msdn example on Feb 17, 2012

Add Answers or Comments

To comment on this question, Sign In with Facebook or Sign Up