Please help I am getting the following error when I am binding the drop down list in the form
Unable to cast object of type 'System.Data.Objects.ObjectQuery1[<>f__AnonymousType0
2[System.String,System.Int32]]' to type 'System.Collections.Generic.List`1
I have written the query in Linq language
return (IList )(from p in db.tbl_PRODUCT_CATEGORY select new { catname = p.category_name, catid = p.category_id, });
I don't know whether it is correct
Please give me the correct format of the query