开发者

linq query gone bad

I have a really complicated linq query that I thought I finally got the syntax right for but it's throwing an exception at runtime: {"The method or operation is not implemented."}

Could someone please take a look?

Thanks!

var order = from Ord in imageCreatorDataContext.Orders
                            join Sub in imageCreatorDataContext.SubjectInfos on Ord.ID equals Sub.OrderID
                            join Pkg in imageCreatorDataContext.PackageOrders on new { Sub.OrderID, Sub.SubjectID } equals new { Pkg.OrderID, Pkg.SubjectID }
               开发者_JAVA百科             join Cpd in imageCreatorDataContext.CustomerPackageDescriptions on new { Pkg.OrderID, Pkg.Pkg } equals new { OrderID = Cpd.OrderID, Pkg = Cpd.ID }
                            where Ord.ReceiveDate != null && Cpd.Description.Contains("MPACD") && Sub.Usage != "unprint" && Ord.ID == _orderID && Sub.SubjectID == s.SubjectID
                            select new { border = Pkg.Theme, background = Pkg.Background };


Is it possible that this is an exception you are throwing from one of your methods?

Example:

public void someMethod()
{
   throw new Exception("The method or operation is not implemented.");
}


I suppose one or more of the collections you're exposing through imageCreatorDataContext is not implemented, like Orders, SubjectInfos, PackageOrders, etc. Check everyo one of them and you should find at least one "Throw new NotImplementedException()" somewhere.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜