Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 420105
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 12, 20262026-05-12T18:50:36+00:00 2026-05-12T18:50:36+00:00

My DAL is created using Linq and all is fine. However, on one page,

  • 0

My DAL is created using Linq and all is fine. However, on one page, I’m to display a table (gridview) which pulls data from a SQL Server database table. However, I’ve heard many warnings about staying away from using any of the built in controls (ObjectDataSource and SQLDataSource). Is there any truth in this, regarding scalability/efficiency? I posted a similar problem before but, in this case, I have direct access to the server. What would be the best way to bind the data to gridview? I can’t cache the data as is it tailored to individuals and I’d rather not store them in sessions as there could be between 100-200 custom objects being called. I haven’t really dabbled in SQL, but with a bit of reading, I’m sure I could create my own custom server side paging/filtering/sorting. Would it be efficient if I created a stored procedure for each of these functions and called them from an objectdatasource, or should I call the SP using Linq to SQL (in my DAL) and then display that information directly to the gridview?

Thanks for any advice

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-12T18:50:36+00:00Added an answer on May 12, 2026 at 6:50 pm

    There is nothing wrong in using a grid view, or custom object data source, if it is only for some hundreds of records. Scalability is an issue for thousands of records. Fastest Access possible would be via a DataReader filling a Datatable. Binding gridviews to a Datatable is always a good idea for a large number of records, as binding is fast and sorting also.

    I have therefore written a library called modelshredder that can translate any IEnumerable collection of objects into a DataTable. It uses dynamically emitted code to do its Job, that’s why it’s fast enough for thousands of records. You can use plain linq-to-sql to write and execute your query, prefetably project into an annonymous type and call .ToDataTable() on the result.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I switched my DAL from using LINQ over to Entity Framework. Because my application
I'm using Linq to SQL for my DAL and have heard various things about
I'm considering using LINQ-to-SQL for creating the DAL in my app. I normally create
Originally there was the DAL object which my BO's called for info and then
Earlier I asked this question How to correctly unit test my DAL? , one
After using a global Linq to Sql DataContext and having unwanted inserts, I decided
The setup: I use Linq to Sql for my DAL and I extend the
I'm working with nHibernate. I have make an Assembly (ex : DAL.dll), which contains
Application I develop requires several data sources (2 RDBMS and one file storage) to
In a PHP project I'm working on we need to create some DAL extensions

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.