Mysql data entity not found
LATEST EDIT Show The bug has been fixed. Chris' comment:
Original answer I found out it's a bug from MySQL. Here's the link explaining a workarround.
Unfortunately it doesn't work for me, so I downgraded to entity framework 5 until they fix this. EDIT Finaly, it works now. I had to add the 3 following DLLs :
Then I changed the EntityFramework part in the web config to :
Don't forget to REBUILD and you should be able to create a entity framework 6 model with MySQL. IMPORTANT Make sure you have installed MySQL for visual studio 1.1.3 and MySQL connector .net 6.8.3 MySQL Connector/NET integrates support for Entity Framework 6 (EF6), which now includes support for cross-platform application deployment with the EF 6.4 version. This chapter describes how to configure and use the EF6 features that are implemented in Connector/NET. In this section:
Minimum Requirements for EF6 on Windows Only
Minimum Requirements for EF 6.4 with Cross-Platform Support
ConfigurationNote The MySQL Connector/NET 8.0 release series has a naming scheme for EF6 assemblies and NuGet packages that differs from the scheme used with previous release series, such as 6.9 and 6.10. To configure Connector/NET 6.9 or 6.10 for use with EF6, substitute the assembly and package names in this section with the following:
To configure Connector/NET support for EF6:
EF6 FeaturesFollowing are the new features in Entity Framework 6 implemented in Connector/NET:
Code First FeaturesFollowing are new Code First features supported by Connector/NET:
Example for Using EF6The following C# code example represents the structure of an Entity Framework 6 model.
The C# code example that follows shows how to use the entities from the previous model in an application that stores the data within a MySQL table. Does Visual Studio 2022 support MySQL?MySQL isn't supported for Visual Studio 2022 yet. it's weird and frustrating, to be honest, but if you want to work with MySQL with VS22, you either need to change the Database or go back to VS19.
Can Entity Framework work with MySQL?MySQL Connector/NET integrates support for Entity Framework 6 (EF6), which now includes support for cross-platform application deployment with the EF 6.4 version.
How to add MySQL Entity Framework in Visual Studio 2019?Let's get started.. Step 1 - Create .NET Core 3.1 project on Visual Studio 2019.. Step 2 - Install dependency packages.. Step 3 - Install MySQL Workbench and MySQL Server.. Step 4 - Create model classes.. UserGroup.cs.. User.cs.. Step 5 - Create a database context.. Step 6: Configure and inject the database connection.. |