Hello All,
I want this below class to return IList<> Please tell me why it is not working
public IList<CheckBoxListInfo> GetLinks()
{
string linkName = string.Empty;
int linkId = 0;
using (var db = new brandconnectionsEntities())
{
var query = from s in db.BC_TabTable
select new
{
linkName = s.TabName,
linkId = s.TabId,
};
IList<CheckBoxListInfo> list = query.ToList() as IList<CheckBoxListInfo>;
return list;
}
}
Thanks Ritz