Browse by Tags

All Tags » LINQ (RSS)

Extension methods on a null object instance by nmarun

Extension methods gave developers with a lot of bandwidth to do interesting (read ‘cool’) things. But there are a couple of things that we need to be aware of while using these extension methods. I have a StringUtil class that defines two extension methods...
Filed under: , ,

Sort method versus OrderBy LINQ extension method by nmarun

I have a class Product with an Id and a Name as properties. There are multiple ways of getting a list of products to display in sorted/ordered fashion, say, by the Name of the product. The two I’m concerned about here are the Sort and the OrderBy extension...
Filed under: , ,

WCF Data Services Toolkit to talk to any database using GetAll, GetOne, Save, Remove methods by nmarun

I did a primer on using WCF Data Services in my last post . One of the things I’m seeing about the posts regarding WCF Data Services using OData is that they used Entity Framework to do the DAL work. So a lot of underlying work gets hidden by using EF...

Accessing data as resource through URI - WCF Data Services by nmarun

Open Data Protocol (OData for short) allows CRUD operations on your data by exposing it as a resource accessible through a URI. So you can try something like below directly on the browser to get a collection of all employees less than 26 years of age...

Top 10 posts of 2010 by nmarun

I quote one of my professors when I say: “We Share – We Improve”. It is through blogging that I’ve learned quite a bit. The ‘R&D’ done to learn and perfect a technology and the comments by other experts adds towards skill-set building. Below are some...

LINQ to JS by nmarun

A couple of days ago I got to know about LINQ to JavaScript plug-in. LINQ itself has been like – the more I play with it, the more I want to play with it and the more there is to learn about it. So this LINQJS comes as a new geography for me to explore...
Filed under: , , ,

Parallel LINQ - PLINQ by nmarun

Turns out now with .net 4.0 we can run a query like a multi-threaded application. Say you want to query a collection of objects and return only those that meet certain conditions. Until now, we basically had one ‘control’ that iterated over all the objects...
Filed under: ,

LINQ – SequenceEqual() method by nmarun

I have been looking at LINQ extension methods and have blogged about what I learned from them in my blog space . Next in line is the SequenceEqual() method. Here’s the description about this method: “Determines whether two sequences are equal by comparing...
Filed under: ,

LINQ – Skip() and Take() methods by nmarun

I had this issue recently where I have an array of integers and I’m doing some Skip(n) and then a Take(m) on the collection. Here’s an abstraction of the code: 1: int [] numbers = { 5, 4, 1, 3, 9, 8, 6, 7, 2, 0 }; 2: var taken = numbers.Skip(3).Take(3...
Filed under: ,

LINQ – TakeWhile and SkipWhile methods by nmarun

I happened to read about these methods on Vikram's blog and tried testing it. Somehow when I saw the output, things did not seem to add up right. I’m writing this blog to show the actual workings of these methods. Let’s take the same example as showing...
Filed under: ,
More Posts