LINQ 2 SQL Cheat Sheet
- Posted: Aug 13, 2009 at 6:45 AM
- 566 Views
- 4 Comments
Loading User Information from Channel 9
Something went wrong getting user information from Channel 9
Loading User Information from MSDN
Something went wrong getting user information from MSDN
Loading Visual Studio Achievements
Something went wrong getting the Visual Studio Achievements
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; db.SubmitChanges();
The cheat sheet has a bunch of additional samples.
[via Scott Hanselman via Jeff Handley]
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.
Follow the Discussion
Oops, something didn't work.
What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in. You need to be signed in to Channel 9 to use this feature.What does this mean?
Following an item on Channel 9 allows you to watch for new content and comments that you are interested in and view them all on your notifications page.sign up for email notifications?
Linq2Sql is part of the framework, while it may not be getting updates, it is not getting removed.
Entity Framework has a lot of power features but L2S is extremely simple to use and implement.
One access method may not fit everyone.
I thought LINQ 2 SQL was dead and we are going to ADO.Net Entity Framework?
We designed a nice poster for infosupport with graphical representation of the link operators
see http://www.infosupport.com/LINQ (site is in dutch)
@Marcobdv, use Microsoft Translator!
http://www.microsofttranslator.com/BV.aspx?ref=Internal&a=http://www.infosupport.com/LINQ">http://www.infosupport.com/LINQ">http://www.microsofttranslator.com/BV.aspx?ref=Internal&a=http://www.infosupport.com/LINQ
Remove this comment
Remove this thread
close