我从 var 类型的不同表中获取值,我想返回它们。函数的返回类型应该是什么:-
public void getlist()
{
try
{
using (ShowDataToClientDataContext c = new ShowDataToClientDataContext())
{
var recList = (from record in c.GetTable<T_RECORDSHOW>()
where record.RecordStatus.Equals(RecordStatus.Active)
select new
{
Student = (from stu in c.T_STUDENTSHOWs
where stu.Id.Equals(record.StudentId)
select stu.Name).Single().ToString(),
Trade = (from t in c.T_TRADESHOWs
where t.Id.Equals(record.TradeId)
select t.Name).Single().ToString(),
SessionId = (from s in c.T_SESSIONSHOWs
where s.Id.Equals(record.SessionId)
select s.Name).Single().ToString(),
Month = record.Month.ToString(),
Attendance = record.Attendance.ToString(),
}).ToList();
return recList;
}
}
catch
{
}
}
有人帮我吗?