我正在使用以下代码访问数据库中的数据,
IList<MyListDB> MyList = this.GetMyList();
和GetMyList()函数,
public IList<MyListDB> GetMyList()
{
IList<MyListDB> MyList = null;
using (MyDataContext db = new MyDataContext(strConnectionString))
{
IQueryable<MyListDB> EmpQuery = from Emp in db.Details select Emp;
MyList = EmpQuery.ToList();
}
return MyList;
}
但我收到一个错误说明,
Inconsistent accessibility: return type 'System.Collections.Generic.IList<MyExpense.Values.MyListDB>' is less accessible than method 'MyExpense.Values.MyPanorama.GetMyList()'
可能是什么问题呢?提前致谢!