Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7733533
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:00:56+00:00 2026-06-01T07:00:56+00:00

I’m trying to use MySQL (5.5.22, Connector 6.5.4) with Entity Framework 4. I’m using

  • 0

I’m trying to use MySQL (5.5.22, Connector 6.5.4) with Entity Framework 4.

I’m using Model First approach. I successfully managed to create a SQL script from my model.

Now I want to modify my database, then update my model from the modified database (for instance I’m adding a new column to a table, and I’m expecting a new property to be added to the corresponding entity). This approach works just fine with SQL Server 2008 R2.

With MySQL, I can’t make it work: the update wizard always shows my current tables (which are already mapped to entities) as new tables, and tries to add new entities to the model instead of updating the current entities.

enter image description here

Maybe there’s something related to the old #48875 bug (CREATE INDEX modifies the table name case): MySQL forces my table names to be lowercase but those tables are mapped in the MSL as camel case…

Is it actually possible to make MySQL and Entity Framework work together without all those issues?


EDIT

If it can help, when manually renaming tables to use camel case

rename table mytable to mytable_bis
rename table mytable_bis to MyTable

it doesn’t work better.


EDIT 2

If you accept to create new entities from those tables, what are the
differences you can notice? I would pay attention if your generated
tables have primary keys, for example.

When accepting to add new entities in the update wizard from the existing tables, it creates entities that are called just like my existing entities with 1 at the end of the name.

For example, I currently have a simple entity named Zone associated with a table named Zones. After the update from the database, it creates a new entity named Zone1 associated with the table. The mapping between Zone and Zones is broken, and a new mapping is established between Zone1 and Zones.

Zone and Zone1 entities are identical (exactly same properties, same primary keys…etc.).

I then tried to remove all my previous entities and renamed all my XXXX1 entities to XXXX (for instance, I deleted the Zone entity and then renamed Zone1 to Zone).

Then I tried to update from the database a second time: the update wizard was working as expected (no new entities to create, only entities to update).

Then I tried to re-generate the SQL script from the Model…. it worked… but then I tried to update again from the database and the issue came back… the update wizard is still trying to add new entities.


EDIT 3

Finally fixed the issue (thanks to daryal)! The problem was my database schema name was not specified in the model properties… When using SQL Server it’s dbo 99% of the time but it’s not the case with MySQL by default.

When updating the model from the database, the SSDL was updated according to the actual schema name of the database.

But after the database was generated again from the model, the wrong database schema name was used in place of the good one. That’s why it failed when updating again from the DB.

D’oh!

enter image description here

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:00:57+00:00Added an answer on June 1, 2026 at 7:00 am

    First let me say, this is not a direct answer; but may guide you to resolution.
    First open the edmx file using xml editor(right click edmx file and select open with). In the edmx file there are some sections related to object-db mapping, and three of them are important. There are ConceptualModels, StorageModels and mapping nodes. In the storage nodes, check whether names of the tables are ok:

    <EntitySet Name="MasterSet" EntityType="Model1.Store.MasterSet" store:Type="Tables" Schema="dbo" />
    

    In case the table names are not right, just change them and update the related data in the mappings section.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Basically, what I'm trying to create is a page of div tags, each has
I am trying to understand how to use SyndicationItem to display feed which is
We're building an app, our first using Rails 3, and we're having to build
I'm trying to use string.replace('’','') to replace the dreaded weird single-quote character: ’ (aka
I'm trying to create an if statement in PHP that prevents a single post
I'm making a simple page using Google Maps API 3. My first. One marker
I'm new to using the Perl treebuilder module for HTML parsing and can't figure
link Im having trouble converting the html entites into html characters, (&# 8217;) i
That's pretty much it. I'm using Nokogiri to scrape a web page what has
I have a string like this: La Torre Eiffel paragonata all&#8217;Everest What PHP function

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.