Link to home
Start Free TrialLog in
Avatar of Miles Thornton
Miles ThorntonFlag for United States of America

asked on

EF6.1.3 functionimport could not be found in the container

Using Entity Framework 6.1.3 (latest) my stored procedure (a function import) appears at design-time; disappears at runtime.
The function import appears to be present as Intellisense presents the function and its required parameters:
            using (var context = new eCRMEntities())
            {
                result = int.Parse(context.usp_GetIsMortgageEDILoanOwner(request.ID, request.LoanNumber.ToString());
            }
However, at runtime, this line throws: The FunctionImport 'usp_GetIsMortgageEDILoanOwner' could not be found in the container 'eCRMEntities' error.

I have removed and reinstalled EntityFramework from the solution - no change.
I have reviewed my connection string; the database connection is working.
I have other methods invoked on context tables (find() for example); they work just fine.
Avatar of DcpKing
DcpKing
Flag of United States of America image

If you're using something like
return executeFunction("usp_GetIsMortgageEDILoanOwner")

Open in new window

try changing to
return executeFunction("eCRMEntities.usp_GetIsMortgageEDILoanOwner")

Open in new window


hth

Mike
Avatar of Miles Thornton

ASKER

DcpKing,
No, I'm not using anything like that; I'm using the context directly.
ASKER CERTIFIED SOLUTION
Avatar of DcpKing
DcpKing
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I am closing this question as I have had to make a workaround and am under a time crunch to get this project done. DcpKing, thank you for your interest and your attempt to help - much appreciated.
No one else was willing to touch the EF6 question - I'm disappointed by the lack of responses and interest. I've been a paying member of this website for years and usually; the response is much better.

DcpKing; Thank you; you rock.
Sorry I couldn't help more. Good luck!

Mike