You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
many thanks first the work on the DDEX extension.
I've just tried it out. "EF Designer from database" works like a charm.
But when I try creating a database from the model I get the error message:
"[...] No Entity Framework provider found for the ADO.NET provider with invariant name 'Npgsql'. Make sure the provider is registered in the 'entityFramework' section of the application config file [...]"
I suppose this is because this use case is not supported?
The reported error message seems to be misleading as other use case (like described above) do fine.
As far as I have understood, "generate database from model" in VS is
something completely different from migrations. I think we need a .tt
script that can write postgresql syntax.
Hi
Thanks for detail report.
Click 'Generate Database from Model' on the Context Menu.
I need to check it in detail. Please let me allow some while to research it.
—
Reply to this email directly or view it on GitHub #424 (comment).
Ok, I knew it (Generate Database from Model) was not available for Npgsql now, sorry.
As far as I have understood, "generate database from model" in VS is
something completely different from migrations. I think we need a .tt
script that can write postgresql syntax.
Yes. I have checked default "DDL Generation Template" property specified by my edmx. It was SSDLToSQL10.tt.
I will try to make experimental one (SSDLToPgSQL.tt?) for Npgsql. It will take a while...
Include SSDLToPgSQL.tt in the setup, and put into C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen folder. It will be listed in [DDL Generation Template].
@roji C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGen folder is write protected. So VSIX setup won't write there. We need an Administrator privileges to accomplish this installation.
I get the EF5 error again , I managed to get past this in order to Update Model From DB by adding EF5 dll in PrivateAssemblies but appears again ussing this script
Activity
kenjiuno commentedon Dec 5, 2014
Hi @Swervage
Thanks for trying DDEX extension!
Ok, are you using EntityFramework 6.0?
If so, check App.config in your project.
It has a configuration/entityFramework/providers/provider section?
Edit Version=2.2.3.0 to your Npgsql.EntityFramework's assembly version.
Thanks
kenji uno
molnargab commentedon Jan 19, 2015
I seem to get the same exception (on VS 2013 Update 4, Npgsql 2.2.3):
To reproduce:
It seems the database generation is not aware of the assembly, or VS uses the incorrect template (files in the trace are for T-SQL).
@Swervage, is it the same you got?
@kenjiuno, is schema generation supported by Npgsql? I couldn't really find this e.g. on the Wiki.
kenjiuno commentedon Jan 20, 2015
Hi
Thanks for detail report.
I need to check it in detail. Please let me allow some while to research it.
Emill commentedon Jan 20, 2015
As far as I have understood, "generate database from model" in VS is
something completely different from migrations. I think we need a .tt
script that can write postgresql syntax.
Hi
Thanks for detail report.
Click 'Generate Database from Model' on the Context Menu.
I need to check it in detail. Please let me allow some while to research it.
—
Reply to this email directly or view it on GitHub
#424 (comment).
kenjiuno commentedon Jan 20, 2015
Ok, I knew it (Generate Database from Model) was not available for Npgsql now, sorry.
Yes. I have checked default "DDL Generation Template" property specified by my edmx. It was SSDLToSQL10.tt.
I will try to make experimental one (SSDLToPgSQL.tt?) for Npgsql. It will take a while...
Some sites I have found by googling.
How to: Customize Database Generation (Generate Database Wizard)
MySQL seems to have already implemented generator. It will be helpful information to implement new one...
EF6 and MySQL Generate Database from Model
kenjiuno commentedon Jan 26, 2015
Hi.
Perhaps it is not easy...
SSDLToPgSQL.tt (Experimental, not production ready)
https://gist.github.com/kenjiuno/8f93c1b1bf3c40baabab#file-ssdltopgsql-tt
Screen shots:
4. Show property of diagram (Right click an empty area, and then choose Property).8. See dialog [Generate Database Wizard], click [Finish]10. See [xxx.edmx.sql] in a new text editor (T-SQL highlighting enabled)kenjiuno commentedon Jan 26, 2015
Here is an entire output from my sample wflow db:
kenjiuno commentedon Apr 27, 2015
todo
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGenfolder. It will be listed in [DDL Generation Template].Emill commentedon Aug 23, 2015
Hi @kenjiuno. What is the status for this?
kenjiuno commentedon Aug 24, 2015
This is not yet done. It should be done with #718
funny-falcon commentedon Mar 30, 2017
Is it fixed now?
roji commentedon Apr 2, 2017
@funny-falcon, the DDEX extension was rewritten for 3.2 - but I'm not sure whether this works or not. @kenjiuno, any chance you could look?
kenjiuno commentedon Apr 3, 2017
@roji
C:\Program Files (x86)\Microsoft Visual Studio 12.0\Common7\IDE\Extensions\Microsoft\Entity Framework Tools\DBGenfolder is write protected. So VSIX setup won't write there. We need an Administrator privileges to accomplish this installation.Some ways to do this: add an instruction steps for manual installation under http://www.npgsql.org/doc/ddex or
I can prepare a small and separated setup only for
SSDLToPgSQL.tt.Setup is simple. Copy
SSDLToPgSQL.ttto necessary locations.Pierre-Henry-Dufetel commentedon May 10, 2018
I get the EF5 error again , I managed to get past this in order to Update Model From DB by adding EF5 dll in PrivateAssemblies but appears again ussing this script
roji commentedon Jun 8, 2018
Closing for age for mixing too many issues. Specific new issues can be opened again after testing on recent versions.