I am working with Entity Framework 4.0, VS 2010, MySql server database, and mysql-connector-net-6.4.4 for connection purpose. It works fine, that said, it can generate Model classes, csdl, ssdl etc files well. But, for stored procedures it doesn’t work.
Here is what happens..
Right clicked on an SP from Model Browser, select [Add Function Import]. This opened a dialog box
Filled appropriate values like, Function Import Name, Stored Procedure Name
Click on [Get Column Information]. This results into some Grid filled up at the bottom of this button. In the grid, there is a column named [EDM Type]. This column shows [Not supported] due to some unknown reason 🙁
Now, clicked on [Create New Complex Type]. This goes OK, without Error
Now, clicked on OK button
After doing all above steps, there is no Complex Type created in the code however, which is the problem.
Can anyone please help?
The generated
Complex Typeis in theComplex Typesfolder in the Model part of the Model Browser.To access ti in code, use it as any other Entity
And you can use it as a result type for your stored procedure:
You must ensure that the
GridView‘s columns mappings match theComplex Type‘s properties, or that theGridView‘s propertyAutoGenerateColumnsis set to true.