{"id":98,"date":"2008-10-19T09:56:00","date_gmt":"2008-10-19T09:56:00","guid":{"rendered":"https:\/\/wdev-blog.azurewebsites.net\/index.php\/2008\/10\/19\/linq-over-untyped-datasets\/"},"modified":"2008-10-19T09:56:00","modified_gmt":"2008-10-19T09:56:00","slug":"linq-over-untyped-datasets","status":"publish","type":"post","link":"http:\/\/panahy.nl\/index.php\/2008\/10\/19\/linq-over-untyped-datasets\/","title":{"rendered":"LINQ over untyped DataSets"},"content":{"rendered":"<p>This example comes from the AppDev (Exploring Visual Studio 2008 Using Visual C#)<\/p>\n<pre><br \/>DataSetr ds = FillDataset();<br \/>DataTable customerTable = ds.Tables[\"Customers\"];<br \/><br \/>\/\/ DataTable does not implement IEnumerable<br \/>var cutomers = from c in customerTable.AsEnumerable()<br \/>               where c.Field<string>(\"Country\") == \"USA\"<br \/>               select new <br \/>               {<br \/>                   CustomerID = c.Field<string>(\"CustomerID\"),<br \/>                   ContractName = c.Field<string>(\"ContractName\")<br \/>               {;<br \/><br \/><\/pre>\n","protected":false},"excerpt":{"rendered":"<p>This example comes from the AppDev (Exploring Visual Studio 2008 Using Visual C#) DataSetr ds = FillDataset();DataTable customerTable = ds.Tables[&#8220;Customers&#8221;];\/\/ DataTable does not implement IEnumerablevar cutomers = from c in customerTable.AsEnumerable() where c.Field(&#8220;Country&#8221;) == &#8220;USA&#8221; select new { CustomerID = c.Field(&#8220;CustomerID&#8221;), ContractName = c.Field(&#8220;ContractName&#8221;) {;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[80,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":"This example comes from the AppDev (Exploring Visual Studio 2008 Using Visual C#) DataSetr ds = FillDataset();DataTable customerTable = ds.Tables[\"Customers\"];\/\/ DataTable does not implement IEnumerablevar cutomers = from c in customerTable.AsEnumerable() where c.Field(\"Country\") == \"USA\" select new { CustomerID = c.Field(\"CustomerID\"), ContractName = c.Field(\"ContractName\") {;","_links":{"self":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/98"}],"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=98"}],"version-history":[{"count":0,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/posts\/98\/revisions"}],"wp:attachment":[{"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/media?parent=98"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/categories?post=98"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/panahy.nl\/index.php\/wp-json\/wp\/v2\/tags?post=98"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}