Bug #69731 EF: No properties in result classes for imported stored procedures
Submitted: 12 Jul 2013 10:27 Modified: 27 Jun 2016 12:07
Reporter: Stanislav R Email Updates:
Status: Can't repeat Impact on me:
None 
Category:Connector / NET Severity:S2 (Serious)
Version:6.7.4 OS:Windows (Windows 8, VS2012)
Assigned to: CPU Architecture:Any
Tags: c6.7

[12 Jul 2013 10:27] Stanislav R
Description:
When creating model with using of Entity Framework return classes for stored procedures generated without properties. They are just empty.
When I open "Edit Function Import" window and press "Get Column Information" in "EDM Type" column it says "Not Supported"

Entity Framework version 5.0 (installed from NuGet)
Microsoft Visual Studio Premium 2012 Version 11.0.50727.1 RTMREL
Microsoft .NET Framework Version 4.5.50709

Also strange thing that VS2012 About window says that MySQL connector version is 6.5.4, but I have installed 6.7.4. Also I can see that from the MySQL Installer and when I am trying to run separate Connector Installer. Iy also gives me an option to Repair.

How to repeat:
1. Add New Item to project: ADO.NET Entity Data Model
2. While creating a model from database select Stored Procedures and Functions to generate
3. Classes for stored procedures result will be generated, but without propeties
[15 Jul 2013 16:11] Gabriela Martinez Sanchez
Hi Sanislav,

Thanks for your bug report. 
I believe this is a known issue in previous versions which is not fixed yet.

There's a workaround since the mapping of the procedure is done correctly, the only problem is that the constructor of the columns doesn't have a type visible to associate each column with, instead it says Not Supported. An alternative for this is to do the mapping of the results of the procedure to an existing entity type. The entity that you want to use should have the same columns as your select on the store procedure, instead of using the complex type option.

Give it a try and please let us know if this worked for you.

Thanks in advance.
[16 Aug 2013 1:00] Bugs System
No feedback was provided for this bug for over a month, so it is
being suspended automatically. If you are able to provide the
information that was originally requested, please do so and change
the status of the bug back to "Open".
[1 Mar 2015 20:05] priyanka patel
Hi,
I am having a similar issue. 
I am using EF 5.0, 
VS 2013,
 MySQL VS plugin 1.1.3, 
MySQL connector 6.9.3
MySQL installer 5.6.23

Wanted to know if the bug has been fixed with the newer version of MySQL.

Regards,
Priyanka
[2 Mar 2015 10:29] Stanislav R
Nothing has changed since that time.
I used another solution. NHibernate. It is a bit more work to do, but it works fine. Or another solution that I had to use in another project is  MSSQL, everything works perfect. Of cource this solution goes only if costs question is not critical.
[3 Mar 2015 18:34] priyanka patel
Thanks Stanislav for your modest reply..
[14 Apr 2016 19:38] Sean Nolan
This is still broken in EF6 and connector 6.9.8. The workaround of using an entity for result rather than the complex type is not practical because then you end up with lots of unmapped entities in your edmx (assuming the stored proc output does not simply map directly to existing tables and stored proc output will rarely map directly to table schemas).
[27 Jun 2016 12:07] Chiranjeevi Battula
Hello Stanislav R,

Thank you for your feedback.
I could not repeat the issue at our end using with Visual Studio 2013, Connector/NET 6.9.8.

Could you please try with latest version of Connector/NET
https://dev.mysql.com/downloads/connector/net/

Thank you for your interest in MySQL.

Thanks,
Chiranjeevi.
[27 Jun 2016 12:08] Chiranjeevi Battula
Screenshot.

Attachment: 69731.JPG (image/jpeg, text), 251.86 KiB.

[28 Nov 2018 9:51] Raj Joddar
Hi,
I am having a similar issue. 

I am using EF 6.0, 
VS 2015,
MySQL VS plugin 1.2.8, 
MySQL connector 6.9.12,
EntityFramework Version 6.1.2,
MySql.Data 6.9.12,
MySql.Data.Entity 6.9.12,
MySql.data.entities 6.8.3,
MySql.Web 6.8.8

Wanted to know if the bug has been fixed with the newer version of MySQL on Not.
Regards