开发者

How to manipulate the column values in EF4.0 used by ria domain service

开发者 https://www.devze.com 2023-01-24 11:41 出处:网络
IQueryable<vwCandList> vwt = from o in this.ObjectContext.vwCandLists where o.ID == ownerID se开发者_开发知识库lect new vwCandList {
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.

0

精彩评论

暂无评论...
验证码 换一张
取 消