MySQL Forums
Forum List  »  MySQL for Visual Studio

Re: How to start using Entity Framework 6 with MySQL databases
Posted by: Johan Svensson
Date: January 02, 2014 03:17PM

Hello! We’ve been spending so many hours trying to get the “Generate Data from Model..” to work, but no matter what we do, we can’t success.

This is what we do to get the error:
1. Create empty MVC 4 project (internet)
2. Build and run (fine)
3. Install-Package
a. EntityFramework -Version 6.0.2
b. MySql.Data.Entity.EF6
4. Right click folder Model -> Add ADO.NET object
5. Empty model
6. Change DDL Generation Template to SSDLToMySQL.tt
7. Create an Entity
8. Right click and choose “Generate Database from Model…”
9. [Error]*
We’re using:
-Visual Studio 2013 Ultimate without Update 1 RC
-MySQL 5.5.35
-MySQL Connector Net 6.8.3
-MySQL for Visual Studio 1.1.1

Does anyone have any idea? We’re

*Error:
---------------------------
Microsoft Visual Studio
---------------------------
Encountered the following errors while processing the template 'C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen\SSDLToMySQL.tt:
Line 92, Column 0: 'Running transformation: System.NullReferenceException: Object reference not set to an instance of an object.
at Microsoft.Data.Entity.Design.DatabaseGeneration.MetadataWorkspaceExtensions.GetAllAssociationSets(ItemCollection itemCollection)
at Microsoft.VisualStudio.TextTemplating9770EDB7EEA4FAB212FD47C3C49157478918437E5C24BA0C88699C9856FBEAA2348AB189A2E6944E18AC69C509CF8190B80D2774D9B698B84EAF7A310720C20A.GeneratedTextTransformation.TransformText() in c:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen\SSDLToMySQL.tt:line 93'

---------------------------
OK
---------------------------

Options: ReplyQuote


Subject
Views
Written By
Posted
Re: How to start using Entity Framework 6 with MySQL databases
8463
January 02, 2014 03:17PM


Sorry, you can't reply to this topic. It has been closed.

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.