tags:

views:

71

answers:

2

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 }
                            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 };
+1  A: 

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.");
}
Abe Miessler
A: 

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.

Matteo Mosca