Vikram Lakhotia
The Online Weblog of Vikram Lakhotia
-
All the posts in LINQ series
In Last few weeks I have done a few LINQ series Post. Here is a list of all the posts done.
-
LINQ and Aggregate function
LINQ also provides with itself important aggregate function. Aggregate function are function that are applied over a sequence like and return only one value like Average, count, sum, Maximum etc…
Below are some of the Aggregate functions provided with LINQ and example of their implementation. -
Working with Joins in LINQ
While working with data most of the time we have to work with relation between different lists of data. Many a times we want to fetch data from both the list at once. This requires us to make different kind of joins between the lists of data.
-
17 new features in Visual Studio 2010
Visual studio 2010 has been released to RTM a few days back. This release of Visual studio 2010 comes with a big number of improvements on many fronts. In this post I will try and point out some of the major improvements in Visual Studio 2010.
-
Using the StopWatch class to calculate the execution time of a block of code
-
LINQ and the use of Repeat and Range operator
LINQ is also very useful when it comes to generation of range or repetition of data. We can generate a range of data with the help of the range method.
-
Retrieving only the first record or record at a certain index in LINQ
While working with data it’s not always required that we fetch all the records. Many a times we only need to fetch the first record, or some records in some index, in the record set. With LINQ we can get the desired record very easily with the help of the provided element operators.
-
LINQ and conversion operators
LINQ has a habit of returning things as IEnumerable. But we have all been working with so many other format of lists like array ilist, dictionary etc that most of the time after having the result set we want to get them converted to one of our known format. For this reason LINQ has come up with helper method which can convert the result set in the desired format. Below is an example
-
Using set operation in LINQ
There are many set operation that are required to be performed while working with any kind of data. This can be done very easily with the help of LINQ methods available for this functionality. Below are some of the examples of the set operation with LINQ.
-
Grouping data in LINQ with the help of group keyword
While working with any kind of advanced query grouping is a very important factor. Grouping helps in executing special function like sum, max average etc to be performed on certain groups of data inside the date result set. Grouping is done with the help of the Group method. Below is an example of the basic group functionality.