日期:2014-05-20 浏览次数:21192 次
public IQueryable<OfficeToolList> GetMessage(OfficeToolList offID) { DALDataContext MyCon = DAL_Connection.Connection; var linq = from i in MyCon.OfficeToolList where i.ToolID == offID.ToolID select new { softID=i.ToolID, softTypeID=i.ToolClassID, softUrl=i.FileURL, softDownUrl=i.DownloadPageURL, softName=i.ToolName, softEdition=i.Vision, softSize=i.FileLenght, softFormat=i.Type, softDownTime=(from ii in MyCon.DownloadLog where ii.ToolID==offID.ToolID select ii).Count(), softDataTime=i.PublishDate }; foreach (var item in linq) { OfficeChannel.Model.Tips_M_ToolList model = new OfficeChannel.Model.Tips_M_ToolList(); model.ToolName = item.softName; model.Vision = item.softEdition; model.FileLenght = Convert.ToInt32(item.softSize); model.Type = item.softFormat; model.PublishDate = Convert.ToString(item.softDataTime); model.count = item.softDownTime; model.ToolID = item.softID; model.ToolClassID = new Guid(Convert.ToString(item.softTypeID)); model.FileURL = item.softUrl; model.DownloadPageURL = item.softDownUrl; } return linq;//错误在这 转化成什么类型呢? }