MySQL Forums
Forum List  »  MySQL for Visual Studio

Visual Studio 2019, MySql, EntityFramework 6.4 and error 'Type X is not defined'
Posted by: Czarny Lewis
Date: May 04, 2020 08:44AM

I have the problem with use declared entity in Visual Studio 2019.

My project:

- in Visual Studio 2019:
- MySQL Installer on Windows 1.4 with
- MySQL for Visual Studio 1.2.9
- Connector/NET 8.0.20

I have new project -> Windows Forms App in Visual Basic
- .NET Framework 4.8
- NuGet Packet EntityFramework v6.4.0
- NuGet Packet MySql.Data v 8.0.20
- NuGet Packet MySql.Data.EntityFramework v 8.0.20

How is created:
1. Add-> New Item -> ADO.NET Entity Data Model -> Add
2. EF Designer from database -> Next
3. New Connection -> MySQL Data Base ->Ok -> Server name, User name Password -> Connected
4. Save connection settings in AppConfig as: New1Entities -> Next
5. Model NameSpace: New1Model -> Finish
Everything was created (.edmx, diagram) and I see my database in model.


But then I go to Form1.vb and write a line:
"Dim Db as New New1Entities "
I have the error: Type 'New1Entities' is not defined. Rebuild Solution not helping. The same situation I have in C#.

Options: ReplyQuote


Subject
Views
Written By
Posted
Visual Studio 2019, MySql, EntityFramework 6.4 and error 'Type X is not defined'
189
May 04, 2020 08:44AM


Sorry, only registered users may post in this forum.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.