A parameter of type "POCO Class" in ExecuteFunction is incompatible with the type "EFComplexType" returned by the function

We have an EF model that uses POCO generation for its types. We added a stored procedure and created a function import for it. Then we generated a complex type for the result set, and the T4 template formed a business contract (POCO).

Everything works great in our development, development, and QA environments. When we deploy to production, the application runs for a while, and then it throws this exception:

System.InvalidOperationException: A parameter of type "POCO" in ExecuteFunction is not compatible with the type "EFComplexType" returned by the function.

If we reuse the application pool, the exception goes away briefly and then returns, so we reuse the application pool and so on ...

We could not reproduce the problem in any environment other than production, which makes it very difficult to determine the root cause.

I doubt anyone has the answer to this question, but any thoughts on what this might be, areas that we could study, or thoughts on tracking the root cause, would be helpful.

+3
source share
2 answers

, . , EF. ExecuteStoreQuery, ObjectContext. , EF , " ". ADO.NET .

+2

-, . procs dev production?

POCO T4, .

Dev to Deploy EF. , : Dev Environment - SQL 2008, - SQL 2005. EF . . .

, , . , . -, .

?

datacontext?

0

Source: https://habr.com/ru/post/1771749/


All Articles