I have application developed in Visual Studio 2010, .NET 4.0, using MySql database.
I have installed Entity Framework 5.0 and EF 5.x DbContext Generator for VB (using NuGet), then MySql Connector 6.5.5. I'm using Model First approach, so I created two tables, then I chose "Generate database from model.." option. After setting connection provider and connection parameters (with successful test connection to database), I clicked "Finish", and *.sql file was generated but nothing was created in my database. Worse still, the generated SQL script is in SQL Server Flavour and it has a header:
-- --------------------------------------------------
-- Entity Designer DDL Script for SQL Server 2005, 2008, and Azure
-- --------------------------------------------------
-- Date Created: 03/22/2013 12:11:00
-- Generated from EDMX file: C:\Apps\app\DataAccessLayer\DbModel.edmx
-- --------------------------------------------------
SET QUOTED_IDENTIFIER OFF;
GO
USE [MyDatabase];
GO
IF SCHEMA_ID(N'dbo') IS NULL EXECUTE(N'CREATE SCHEMA [dbo]');
GO
(...)
How to enforce EF with Mysql and MySql Connector to automatically create database tables, and to generate MySql script, no SQL Server script?
Best regards, WP