【发布时间】:2017-11-03 10:15:45
【问题描述】:
这是我的代码
public IEnumerable<TestUser> Getdata()
{
//return new string[] { "value1", "value2" };
TestUserBl tstusr = new TestUserBl();
DataTable dt = new DataTable();
dt = tstusr.TestUserSel();
return dt.AsEnumerable();
}
遇到错误
不能隐式转换类型 'System.Data.EnumerableRowCollection' 到 'System.Collections.Generic.IEnumerable'。 存在显式转换(您是否缺少演员表?)
【问题讨论】:
-
TestUserSel()方法有什么作用?
标签: c# asp.net-web-api