how to bind gridview through linq
- by Manoj Wadhwani
I am using linq to sql
Currently i am binding gridviw through linq which query written in business logic call .
i have extract record through query in business logic class and i want to bind that particular data to gridviw and return data .
how to retrun data which type is array.
code is mention below:
CMSBusiness.DataClasses1DataContext db = new DataClasses1DataContext();
var cate = from p in db.categoryTables
select new
{
categoryId=p.categoryId,
categoryName=p.categoryName,
categoryDesc=p.categoryDesc
};
how to return value and bind gridview , Please suggest