{"id":96,"date":"2008-10-19T10:32:00","date_gmt":"2008-10-19T10:32:00","guid":{"rendered":"https:\/\/wdev-blog.azurewebsites.net\/index.php\/2008\/10\/19\/linq-delayed-excecution\/"},"modified":"2008-10-19T10:32:00","modified_gmt":"2008-10-19T10:32:00","slug":"linq-delayed-excecution","status":"publish","type":"post","link":"http:\/\/panahy.nl\/index.php\/2008\/10\/19\/linq-delayed-excecution\/","title":{"rendered":"LINQ Delayed excecution"},"content":{"rendered":"<p>Link statements generate the query and make it ready to be used when it comes to the point where the data is needed. In the following example when the datasource is set the data is needed and that is when the communication with the database takes place:<\/p>\n<pre style=\"font-size : 9pt;\"><br \/><br \/>var products = <br \/>    from p in db.Products<br \/>    orderby p.ProductName<br \/>    select new { p.ProductID, p.ProductName, p.UnitPrice };<br \/>products = products.Skip(itemsToSkip).Take(pageSize);<br \/><br \/>DataGridView1.DataSource = products;<br \/><br \/><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Link statements generate the query and make it ready to be used when it comes to the point where the data is needed. In the following example when the datasource is set the data is needed and that is when the communication with the database takes place: var products = from p in db.Products orderby &hellip; <a href=\"http:\/\/panahy.nl\/index.php\/2008\/10\/19\/linq-delayed-excecution\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;LINQ Delayed excecution&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[33],"tags":[],"uagb_featured_image_src":{"full":false,"thumbnail":false,"medium":false,"medium_large":false,"large":false,"1536x1536":false,"2048x2048":false,"post-thumbnail":false},"uagb_author_info":{"display_name":"Pouya Panahy","author_link":"http:\/\/panahy.nl\/index.php\/author\/pouya\/"},"uagb_comment_info":0,"uagb_excerpt":"Link statements generate the query and make it ready to be used when it comes to the point where the data is needed. In the following example when the datasource is set the data is needed and that is when the communication with the database takes place: var products = from p in db.Products orderby&hellip;","_links":{"self":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/96"}],"collection":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/comments?post=96"}],"version-history":[{"count":0,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/96\/revisions"}],"wp:attachment":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/media?parent=96"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/categories?post=96"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/tags?post=96"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}