Easy Way To Understand LINQ(maniish.wordpress.com)

submitted by manish_ldmanish_ld(25) 3 years, 2 months ago

very limited but simple way to understand the linq query. Once you get this, you can understand more complex queries easily.

1 comment |category: |Views: 34

tags: another

new Add a live kick counter to your blog >> liveImage

You can even customize the image by choosing your own colors, and then clicking the button below to update the preview and the html code:

  • "Kick It" text
  • "Kick It" background
  • kick count text
  • kick count background
  • border

Simply copy and paste this HTML into your blog post.


Users who kicked this story:
Comments:

posted by Tr3vTr3v(376) 3 years, 2 months ago 0

It's just personal preference but I try to limit the

var q = from c in contacts where c.State == "WA" orderby c.LastName, c.FirstName select c

style linq to when it's doing a "select new" (either a type or an anonymous type). The rest of the time I use

var q = contacts.Where(c => c.State == "WA").OrderBy(c => c.LastName).OrderBy(c => c.FirstName);

Reply

information Login or create an account to comment on this story