Entity Framework ADO.net Entity Data Model not working

B M-A 361 Reputation points
2022-08-05T04:54:07.053+00:00

Hello ,

I observed that when I wand to add a new Model created from database is not working.
Can you see in the attached .gif that Add New Item is in an infinite loop.
Is something missing?
228366-gif.gif

.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,263 questions
{count} votes

1 answer

Sort by: Most helpful
  1. B M-A 361 Reputation points
    2022-08-08T07:30:51.737+00:00

    Hello,
    I solved partially my problem using these steps:

    1. I deleted old Edmx file and connection string linked to MySQL server
    2. I changed target framework from 4.5 to 4.7.2
    3. I update EntityFramework , MySql.Data and MySql.Data.EntityFramework to the latest version
    4. I checked and manually changed assembly reference target version to version installed
      After all changes I thin that the problem was that assembly reference not updating correctly.
      Right now I observed that the diagram is not updated correctly (primary and foreign keys and references between tables).
      Also I observed that DDL Generation Template is automatically selected to SSDLToSQL10.tt (VS), but I use MySQL.
      Referring to this I have the following error :

    Error 6002: The table/view 'def.datap.stare_echipamente' does not have a primary key defined. The key has been inferred and the definition was created as a read-only table/view. DataPlanModel.edmx 1

    228949-template.jpg