Reputation: 4474
I am using JQGrid control. It is very powerful and feature rich.
Now I have to consider two things.
What my problem is I have two options to solve this issue.
One is to use C# LinqExtensions methods.
public static class LinqExtensions
{
public static IQueryable<T> OrderBy<T>(this IQueryable<T> query, string sortColumn, string direction)
{
...
}
public static IQueryable<T> Where<T>(this IQueryable<T> query,
string column, object value, WhereOperation operation)
{
....
}
}
Another one is to use stored procedures which allowed to parse parameter values in which included sorting and searching criteria.
If I will use second option, I no longer need to rely on LinqExtension class.
Which option will be best when it comes to performance of web application and large data volume?
Upvotes: 0
Views: 192
Reputation: 1218
Both approaches are fine and can work for any real time application. Few points about both the approaches.
StoredProcedure: Much powerful per-compiled. Write the SP so that it gives your records as per paging and sorting. Use CTE to improve the performance even more. Refer http://www.sqlteam.com/article/server-side-paging-using-sql-server-2005 for more details.
This approach will boost the performance if your database consists lots of records.
LinqExtensions : Still a powerful feature but it works really well with small set of database. If data volume is big you will see performance issues in it.
My personal choice would be the first approach.
Hope it helps.
Upvotes: 1