Lin2Sql No supported translation to sql exception
I have the following code.
var query =
(
from i in _service.GetTimesheetWeeklys()
from s in _service.GetStatuses()
where i.ProjectID == _projectid &&
s.ID == i.Status
select new
{
InvoiceID = i.ID,
DocumentTotal = i.WeekTotal.ToString(),
Create开发者_如何学God = i.Created,
WeekEnding = i.WeekEnding,
Status = s.staStatus
}
).Skip(_pageIndex * _pageSize).Take(_pageSize);
I am getting a "No suported translation exception".
I am not that experienced with Linq2Sql and got that lin2sql code from a previous post.
Any ideas why this would be??
I am guessing it is the join syntax.
Malcolm
At least a Problem lies in here i.WeekTotal.ToString()
.
Calling ToString()
is not supported and L2S couldn't translate it into sql.
精彩评论