Monday, July 18, 2011

LINQ over Datatable


using below code we can use LINQ to query Datatables:

var res = from p in dt.AsEnumerable()
 where p.Field< string >("YourFieldName") == "Value" || p.Field < string > ("YourFieldName") == "Value"
 select p;

Compiled By: Rajesh Rolen

Share This!


No comments:

Powered By Blogger · Designed By Seo Blogger Templates