我有一个非常复杂的linq查询,我认为我终于得到了正确的语法,但它在运行时抛出异常:{“方法或操作未实现。”}
有人可以看一下吗?
谢谢!
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 };
答案 0 :(得分:1)
这是你从一个方法中抛出的异常吗?
示例:
public void someMethod()
{
throw new Exception("The method or operation is not implemented.");
}
答案 1 :(得分:0)
我认为你通过imageCreatorDataContext公开的一个或多个集合没有实现,比如Orders,SubjectInfos,PackageOrders等。检查其中每一个,你应该找到至少一个“在某处抛出新的NotImplementedException()”