Mój projekt (warstwa interfejsu użytkownika to asp.mvc) został opracowany przy użyciu .NET 3.5. Po uaktualnieniu do .NET 4.0 Mam problem z opracowanych zapytaniami:DataContext skompilował problem zapytania z .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
Za każdym razem, gdy uruchomię mojej kwerendy jestem przechodzącej mój kontekst
return StaticQueries.getTopFiveOrders(mContext, int howMany);
public static Func<Mycontext, int, IQueryable<Order>> getTopFiveOrders
= CompiledQuery.Compile
((Mycontext mContext, int howMany) =>
(some query).Distinct());
Błąd występuje na drugim wniosku.