August 2017
M T W T F S S
« May    
 123456
78910111213
14151617181920
21222324252627
28293031  

Archives

Meta

Recent Posts

Tags

asp .net asp .net membership browsers computer crash Guy Burstein javascript link-o-rama LINQ office 2007 optimization outlook 2007 performance ScottGu SQL Server t-sql web servers workarounds xmlhttprequest

« ASP .Net says: Look, Ma, I’m a Javascript! | Main | SQL Server: Data types text / ntext won’t play with sort or LIKE. »

LINQ here, LINQ there, LINQ everywhere

By juliana | April 22, 2008

According to DA GURU (that’s Scott Guthrie), on his article LINQ to SQL (Part 5 – Binding UI using the ASP:LinqDataSource Control)

We will also take advantage of the built-in paging/sorting support within LINQ to SQL to ensure that features like the product listing paging/sorting are performed not in the middle-tier, but rather in the database (meaning only 10 products are retrieved from the database at any given time – we are not retrieving thousands of rows and doing the sorting/paging within the web-server).

Emphasis mine.

Whoohoo! Automatic server side paging. Srsly? Must read more and find a way to implement. Never mind that I’ve already done my stored procedures for the old way of doing server-side paging; this is worth the investment. (Even if some people don’t think so.)

Read the rest of the article here.

ETA: After digging through the articles, I’ve come to the conclusion that this automatic paging only works if you’re LINQ’ing directly to the database tables (e.g. using LINQ expression/syntax). The interface takes care of the iteration so that it only draws out the necessary rows. However, I believe if you’re using LINQ to access a stored procedure, you lose this automatic “skip and take” feature. At least, that’s what it seems to me. Throwing a SP into the DBML only exposes the SP interface, but LINQ would be able to go into the stored procedure and optimize it. So, in order to do paging by LINQ , the stored procedure would have to retrieve all the rows (think: virtual table, except this one has to be constructed completely and wholly every time it’s called) and hand it off the LINQ. Yeouch.

Click on pen to Use a Highlighter on this page

Topics: I Canz Code! | 19 Comments »

19 Responses to “LINQ here, LINQ there, LINQ everywhere”

  1. Video Company Alpharetta Says:
    March 5th, 2015 at 6:56 am

    My brother suggested I would possibly like this blog.
    He was totally right. This publish actually made my day.

    You cann’t consider simply how much time I had spent for this information! Thank you!

  2. Success Made Simple Says:
    March 9th, 2015 at 7:32 pm

    There’s certainly a great deal to find out about
    this topic. I love all the points you’ve made.

  3. what is eczema Says:
    March 9th, 2015 at 11:03 pm

    It’s amazing designed for me to have a web page, which is helpful for my knowledge.
    thanks admin

  4. commercial roof replacement Fort Worth Says:
    March 13th, 2015 at 6:36 am

    My brother suggested I may like this web site. He was
    once entirely right. This submit actually made my day.

    You cann’t believe just how much time I had spent for this information! Thanks!

  5. check this out Says:
    April 14th, 2015 at 8:21 pm

    It’s truly very complicated in this busy life to
    listen news on Television, therefore I just use web for
    that reason, and take the most up-to-date information.

  6. The Pirate Bay Says:
    April 16th, 2015 at 1:39 am

    They would like to know about the sites
    you like to visit, your emails, your interests, your region and so on. Same method as above only you post music,
    download software called “supermp3download” (still find it on torrent
    sites) and download music that other people are searching
    for, if you’re familiar with google alert you may set up a contact alert when someone seeks
    music. The reason behind this is because fiber
    optic cables are made-up of conducting light material and for that reason transmit the sunlight from the end to a new end.

  7. cheap escort companionship Says:
    April 17th, 2015 at 6:01 pm

    My partner and I absolutely love your blog and find almost all
    of your post’s to be what precisely I’m looking
    for. Does one offer guest writers to write content to suit your needs?
    I wouldn’t mind composing a post or elaborating on a number of the subjects you write related to here.
    Again, awesome blog!

  8. poner teclado en arabe Says:
    June 12th, 2015 at 5:58 am

    Creo que Nisus Writer estaba listo para redactar en árabe, pero hace mucho que no
    lo pruebo y no sé si las últimas versiones prosiguen haciéndolo., Omán, Países Bajos, Pakistán, Paraguay, Perú, Polonia, Portugal,
    RAE de Hong Kong, R. , Checa, República Dominicana, Camboya, Camerún, Canadá, Chad, Chile, China, Chipre, Colombia, Comoras, Congo,
    Congo (RDC), Corea de Sur, Côte d’Ivoire, Costa Rica, Guyana, Haití, Honduras, Hungría, India,
    Indonesia, Irak, Irlanda, Islandia, I. , Marshall, I. , República Centroafricana,
    R. , Por ende, aprender árabe no implica, como afirmaba,
    aprender palabras, sino más bien un tandem cultura-religion absolutamente nuevo.,
    Países Bajos, Portugal, Que ya estoy harto de la típica guerra facha-independentista… Un saludo a todos., La ventaja de este teclado
    son las grandes posibilidades de configuración que disponemos para su
    interfaz.

  9. chimeneas leroy merlin electricas Says:
    June 20th, 2015 at 10:10 am

    Resguardar con vaselina neutra las partes interiores de hierro derretido,
    si se quiere sostener sin perturbaciones su aspecto estético
    en el tiempo.

  10. Patriots Broncos Says:
    November 28th, 2015 at 3:47 am

    t mean you have to compromise with the picture and sound quality.
    She is shown to be a war journalist who goes
    to Kargil to cover the then on-going Indo-Pak war. Bookworm’s sturdy flashlight features an extra-long-lasting lightbulb, bright enough to read by without causing eyestrain.

  11. Youth Torrent Kickass Says:
    December 2nd, 2015 at 8:43 am

    All you may need to do is download an easy to install satellite TV on PC program and you are as good as ready.
    Jupiter Ascending tells the story of Jupiter Jones who was born with special
    abilities with the help of which she is able to perform
    some impossible acts. They can fit both adults and children and the Wonka costume
    is a crazy top hat and tails look, so much fun.

  12. Chase Says:
    December 8th, 2015 at 1:10 pm

    Si bien Cameron es celebrado como uno de los primeros fotógrafos
    conocidos y un artista importante e influyente de
    su tiempo, que sólo obtuvo su primera cámara
    a la edad de 48. Esto marcó el inicio de su carrera fotográfica,
    donde sus retratos de personajes conocidos y atractivos insinuado en el nacimiento de una cultura de la celebridad.

  13. Nichol Says:
    January 11th, 2016 at 8:31 pm

    Los fotógrafos famosos actuales son un claro ejemplo de ello;
    en tanto que además de ser capaces de captar imágenes de la realidad, asimismo logran transmitir sentimientos a través de ellas y conmovernos con sus obras.

  14. everydaylifesblog.wordpress.com Says:
    March 25th, 2016 at 8:27 am

    Awesome! Its really awesome piece of writing, I have got much clear idea regarding from this
    paragraph.

  15. avast pro license key Says:
    April 24th, 2016 at 8:59 pm

    Your place is valueble for me. Thanks!…

  16. computer herstellingen Says:
    September 5th, 2016 at 7:12 pm

    Superb blog you have here but I was curious about if you knew of any discussion boards that cover the
    same topics discussed in this article? I’d really like to
    be a part of community where I can get comments from other experienced individuals that share the same interest.
    If you have any suggestions, please let me know.
    Thank you!

  17. stabmagnete Says:
    September 7th, 2016 at 10:27 pm

    Thank you for any other informative website. The place else may just I get that kind of info written in such an ideal means?

    I’ve a mission that I am just now operating on, and
    I’ve been on the glance out for such info.

  18. devenir riche Says:
    October 24th, 2016 at 2:11 pm

    Wonderful beat ! I wish to apprentice while you amend your web site,how could i
    subscribe for a weblog website? The account helped me a applicable deal.
    I had beewn a liftle bit familiar of this your broadcast
    offered brilliant transparent concept

  19. ingles oraciones afirmativas negativas interrogativas Says:
    November 6th, 2016 at 10:10 am

    Buen día. Tengo 30 años y me encuentro aprendiendo inglés
    más o menos 9 años. Su texto lo he encontrado genial para el aprendizaje idioma inglés.
    Me ha sido muy práctico. Lo voy a aumentar a mis favoritos.
    Te doy las gracias por el relato.

Comments