using (HFDBEntities dc = new HFDBEntities())
{
var q = dc.ItemDetails.Select(c => new { c.ID, c.Name, c.Category, c.Price,c.ItemDiscription }).Take(20);
var result = q.AsEnumerable().Select((x, RowNumber) => new
{
RowNumber = RowNumber + 1,
ID = x.ID,
Name = x.Name,
Category = x.Category,
Price = x.Price,
ItemDiscription=x.ItemDiscription
});
gridControl.DataSource = result.ToList();
bsiRecordsCount.Caption = "RECORDS : " + result.Count();
}
please give me solution of this error