none
Entity Framework With mysql Database First RRS feed

  • Question

  • Hi there, i'm working in a new project with c# and we want to use entity framework 6 but everytime we want to generate the models based on the database we have in usage. But when i'm generating a ADO.Net model using the wizard, after i select the database and the entity framework i click on the "next" button and instead appear the window to select the tables , the windows disappear without any type of error.

    I'm using visual studio 2017 community edition and i've installed the mysql connector v.8.0.11. If i downgrade the mysql connector version and entity framework to v5 everything works without any problem, but after i update the connector and entity framework to version 6.* i get the problem i've reported above.

    • Moved by CoolDadTx Tuesday, May 8, 2018 1:49 PM EF related
    Tuesday, May 8, 2018 9:58 AM

All replies

  • You know that this is a Microsoft forum. 

    MySQL is an Oracle product therefore it is better to ask it in their forums. 

    https://forums.mysql.com


    Success
    Cor

    Tuesday, May 8, 2018 10:57 AM
  • You know that this is a Microsoft forum. 

    MySQL is an Oracle product therefore it is better to ask it in their forums. 

    https://forums.mysql.com


    Success
    Cor

    Yes i know this is a microsoft forum and mysql is an Oracle product, but since i'm using both together with a Microsoft product (Entity Framework) and using the visual studio product to try develop this app, and because of that i've requested help on this forum.

    Tuesday, May 8, 2018 11:38 AM
  • Did you check and verify all of the requirements?

    https://dev.mysql.com/doc/visual-studio/en/visual-studio-install.html

    FYI, the integration features are typically supported by the vendor and not Microsoft.


    Paul ~~~~ Microsoft MVP (Visual Basic)

    Tuesday, May 8, 2018 1:14 PM
  • Yes i know this is a microsoft forum and mysql is an Oracle product, but since i'm using both together with a Microsoft product (Entity Framework) and using the visual studio product to try develop this app, and because of that i've requested help on this forum.

    To make it more understandable for me. If you have a Samsung microwave in your house which has a problem. Then you go to the contractor who did build your house?

    There are few contractors with knowledge of microwaves. 

    Of course you can get replies here, those who give those on this kind of questions are mostly anonymous and can give any reply. 


    Success
    Cor

    Tuesday, May 8, 2018 1:23 PM
  • Hi rubemlrm,

    I would suggest that you could install MySQL for Visual Studio and check if works for you. it works on my side.

    https://dev.mysql.com/downloads/windows/visualstudio/

    Best regards,

    Zhanglong


    MSDN Community Support
    Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.

    Wednesday, May 9, 2018 1:22 AM
    Moderator
  • Hi I've the same problem.

    Did you found any solution ?

    thanks

    Francesco

    Wednesday, July 4, 2018 9:43 AM
  • You know that this is a Microsoft forum. 

    MySQL is an Oracle product therefore it is better to ask it in their forums. 




     Indeed it seams a Microsoft issue: the windows disappear without any type of error.
    Wednesday, July 4, 2018 9:50 AM
  • Hi!

    I was having the same problem and found the solution on stackoverflow, searching for "mysql entity framework database first". (Can't post the link because my account is not verified yet)

    The problem is that in the documentation of MySql Connector for .NET it says to install the NuGet Package "MySql.Data.Entity", but actually the correct package is "MySql.Data.EntityFramework". When I changed the package it worked for me!

    Hope I could help.

    Best Regards.

    EDIT: I used the last version of every package and connector (v8.0.13) and EntityFramework v6.2, .NET Framework v4.5.2, Visual Studio 2017 Community
    • Proposed as answer by yagoocarvalho Thursday, December 20, 2018 3:21 PM
    • Edited by yagoocarvalho Thursday, December 20, 2018 3:27 PM Added package version
    Thursday, December 20, 2018 3:21 PM
  • That advice helped me out, Thanks.  After installing the EntityFramework version however, I still had trouble.  I found that there was malformed xml in the app.config (whitespace in the <provider> tag that mysql generated) and fixed that, and did a build of the project.  After, that, I was able to get the data model wizard to move forward.  Thanks!
    Sunday, December 23, 2018 6:39 AM