April 2010 - Posts

1
Comments

LINQ and Aggregate function by vik20000in

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...
Filed under: , , ,
1
Comments

Working with Joins in LINQ by vik20000in

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. LINQ support...
Filed under: , , ,
1
Comments

17 new features in Visual Studio 2010 by vik20000in

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. 1) Visual...
2
Comments

Using the StopWatch class to calculate the execution time of a block of code by vik20000in

Many of the times while doing the performance tuning of some, class, webpage, component, control etc. we first measure the current time taken in the execution of that code. This helps in understanding the location in code which is actually causing the...
1
Comments

LINQ and the use of Repeat and Range operator by vik20000in

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. var numbers = from n in Enumerable.Range(100, 50) select new {Number = n, OddEven = n % 2 == 1 ? "odd...
Filed under: , , ,
1
Comments

Retrieving only the first record or record at a certain index in LINQ by vik20000in

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...
Filed under: , , ,
1
Comments

LINQ and conversion operators by vik20000in

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...
Filed under: , , ,
2
Comments

Using set operation in LINQ by vik20000in

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...
Filed under: , , ,
1
Comments

Grouping data in LINQ with the help of group keyword by vik20000in

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...
Filed under: , , ,
3
Comments

LINQ and ordering of the result set by vik20000in

After filtering and retrieving the records most of the time (if not always) we have to sort the record in certain order. The sort order is very important for displaying records or major calculations. In LINQ for sorting data the order keyword is used...
Filed under: , , ,
More Posts Next page »