मेरा प्रोजेक्ट (UI परत asp.mvc) .NET 3.5 का उपयोग करके विकसित किया गया था। नेट 4.0 पर अपग्रेड करने के बाद मैं संकलित प्रश्नों के साथ समस्या यह मिल गया है:डेटाकॉन्टेक्स्ट संकलित क्वेरी समस्या .NET 4
[ArgumentException: Query was compiled for a different mapping source than the one associated with the specified DataContext.]
System.Data.Linq.CompiledQuery.ExecuteQuery(DataContext context, Object[] args) +863348
System.Data.Linq.CompiledQuery.Invoke(TArg0 arg0, TArg1 arg1) +110
हर बार जब मैं अपने क्वेरी चलाने मैं अपने संदर्भ
return StaticQueries.getTopFiveOrders(mContext, int howMany);
public static Func<Mycontext, int, IQueryable<Order>> getTopFiveOrders
= CompiledQuery.Compile
((Mycontext mContext, int howMany) =>
(some query).Distinct());
दूसरा अनुरोध पर त्रुटि होती गुजर रहा हूँ।