Loading user information from Channel 9

Something went wrong getting user information from Channel 9

Latest Achievement:

Loading user information from MSDN

Something went wrong getting user information from MSDN

Visual Studio Achievements

Latest Achievement:

Loading Visual Studio Achievements

Something went wrong getting the Visual Studio Achievements

LINQ 2 SQL Cheat Sheet

linq Damien Guard has created a nice little cheat sheet for LINQ 2 SQL.  Damien even went the extra yard and put it in both VB.Net and C# since the syntax is slightly different for each.

If you haven't tried LINQ2SQL, it is pretty powerful.  Stuff that typically would have been a bit more complex has become extremely simple.  Want to do a paged statement?

var page3 = (from c in db.Customers
orderby c.ContactName, c.City descending 
select c).Skip(10).Take(5);

Update a record?

customer.ContactName = "Adam";
customer.Location = null;

The cheat sheet has a bunch of additional samples.

[via Scott Hanselman via Jeff Handley]


Follow the discussion

  • Oops, something didn't work.

    Getting subscription
    Subscribe to this conversation

Remove this comment

Remove this thread


Comments closed

Comments have been closed since this content was published more than 30 days ago, but if you'd like to continue the conversation, please create a new thread in our Forums, or Contact Us and let us know.