I have a stored proc in my database that returns an integer. I added the Import function to my model. This is displayed in the EDMX file:
<Function Name="GetTotalEntityCount" Aggregate="false" BuiltIn="false" NiladicFunction="false" IsComposable="false" ParameterTypeSemantics="AllowImplicitConversion" Schema="dbo" />
However, no method is generated for this. It must be the top level, right?
using (MyContext context = new MyContext())
{
context.MyMethodShouldBeRightHere();
}
Nothing appears in Intellisense, I went through the designer.cs file and there is nothing there, and reflected the DLL ... nothing. The code generator simply does not generate any code to support this stored process.
I added another table to my database and updated the model, and it appeared, so the model is updated, it just ignores this saved process.
I tried everything I could think of and consulted with every resource that I can find, and as far as I can tell, I am doing everything right.
EF4, . ( , . :
Runtime Version:4.0.30319.1
)