Posts Tagged ‘ Linq

Preventing SQL Injection Using Linq

SQL injection is one of the most common hacking methods for websites where authentication is required for accessing the website content. In this article we try to verify if linq based data access layers are truly immune to SQL injection.

Read more

Efficient Server Side Paging Alternatives

Every one of us has used paging in our projects to display tabular data in DataGrids or GridViews or in the more recent and more flexible ListViews.

The problem we often face is when the data is less the paging works fine, but as the data starts to increase the page load times start increasing. The main reason for this is because we tend to bind the grids with entire data table and then use the built in functionality for paging.

This article describes how to effectively do server side paging by retrieving only a finite amount of data using the traditional stored procedure technique, but optimized for not being affected by volume of data, and an alternative method using the very famous linq framework.

Read more

Linq Filters On Lists

Microsoft .net framework 3.5 introduced the Language Integrated Query (Linq) feature. Linq provides a set of query operators to filter, join and perform other such data related operations on various types datasources such as lists, dictionaries, datasets etc.

In this article we perform a simple filter operation on a collection of data stored in a list using the traditional foreach loop method and the linq method and compare the performance statistics.

Read more