Contents tagged with LINQ
-
Extension methods on a null object instance
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.
-
Sort method versus OrderBy LINQ extension method
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 method through LINQ and the difference between them.
-
WCF Data Services Toolkit to talk to any database using GetAll, GetOne, Save, Remove methods
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. Here is a post that allows you to connect to any database using the traditional ADO.NET way.
-
Accessing data as resource through URI - WCF Data Services
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.
http://somesite.com/EmployeeService.svc/Employees?$filter=Age lt 26 -
Top 10 posts of 2010
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 of the articles that I’m glad I blogged about.
-
LINQ to JS
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. Here’s what I’ve learnt till now.
-
Parallel LINQ - PLINQ
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 in the collection, checked the condition on each object and returned if it passed.
-
LINQ – SequenceEqual() method
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.
-
LINQ – Skip() and Take() methods
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:
-
LINQ – TakeWhile and SkipWhile methods
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.