Page 1 of 1

Imported Function does not create class method

Posted: Wed 04 Mar 2009 10:15
by nbonne
I am using dotconnect version 5.0.22.0 and oracle instance 9.2

I have selected and added a stored procedure to the entity model via the "update model from database" wizard. This results in the storage model as :







Then I do a function import (via edm wizard) selecting the stored
procedure and mapping it to a function import name 'CopyPage'.

This results in the conceptual model as :

FunctionImport Name="CopyPage">




and in the mapping layer as :



All looks correct and the project builds successfully in VS2008. However there is no method generated in the EntityModel.Designer.cs class. So I can not access the imported function from code. I did a similar excercise

with SQL server 2005 following same steps and that created the method after the build.

From this forum I am reading this is working for quite some other users. So Any idea what I may be doing wrong or is it a version related issue ?

Posted: Wed 04 Mar 2009 11:59
by AndreyR
Could you please try the same scenario with the new Entity Developer 2.0 Beta?
If it also fails, please let me know.

Posted: Wed 04 Mar 2009 12:20
by nbonne
Indeed all OK with the Entity Developer 2.0b. It does generate the class method. Do you still plan to patch the current 5.0.22.0 version ?

thanks

Posted: Thu 05 Mar 2009 08:18
by AndreyR
Are you mapping your SP to any entity in the model? If no, than the problem is associated with the limitations of Microsoft Entity Data Model Designer - it simply does not generate code for such Function Import.

Posted: Thu 05 Mar 2009 12:10
by nbonne
Indeed that explains. The stored procedure does not map to any entity type. Whereas for the SQL2005 case, that I was referring to, I do have a return type mapped to an entity type.