IQueryable<vwCandList> vwt = from o in this.ObjectContext.vwCandLists
where o.ID == ownerID
se开发者_开发知识库lect new vwCandList {
noteID = o.noteID,
DateMade = o.DateMade.Value.AddMinutes(600),
ownerID = o.ownerID,
ownerType = o.ownerType,
Type = o.Type };
it complies very well but when called from aspx page it is throwing error of "The entity or complex type 'RM.vwCandList' cannot be constructed in a LINQ to Entities query."
Pls help.
Why not just select o? Naming wise they appear to be the same type and you can iterate over the result to add the 10 hours after it is fetched.
精彩评论