views:

146

answers:

2

I have mysql database with a store procedure. When I added to schema, I found in edmx this:

<Function Name="abzac_GetByPage" Aggregate="false" 
 BuiltIn="false" NiladicFunction="false" IsComposable="false" 
 ParameterTypeSemantics="AllowImplicitConversion" Schema="paragraph" />

This I have in SSDL part. But nothing in Designer.cs file, whats wrong?

A: 

You should create Function Import (just right-click on the function in the Store part of the model and select Create Function Import...)
But be aware that if you are using EF v1.0 the function import will be created only when the function returns a result set. Upcoming EF v4 does not contain this limitation.

Devart
A: 

You must try and recreate the .edmx, checking the stored procedure when creating the model. Sometimes the designer fails to add the stored procedure/function import with update. And yes, I guess there is a need to select a return type. After recreating the .edmx I selected my "void wanna-be function" to return an int.

Cosmin T.