Click here to Skip to main content
15,886,919 members
Please Sign up or sign in to vote.
1.00/5 (2 votes)
See more:
I am working with EntityFramework6.npgsql I am creating "EF designer with database", It does not show any error but no diagram present in the edmx file. Also lots of "reference missing" errors occur. Image is attached after generating "EF with designer"

What I have tried:

I have tried to change versins of dll files also
Posted
Updated 28-Feb-18 1:50am
v2
Comments
Maciej Los 28-Feb-18 3:30am    
We can't read in your mind and also do not have an access to you HDD. Can you be more specific and provide more details about your issue?
Sudhir Dehade 28-Feb-18 7:27am    
Have you ever used entity-framework..?
If yes then you should know what I am talking, I want to generate model diagram "Entity Data Model XML" i.e. EDMX. All process goes fine but there is no entities generated in the EDMX diagram....
Maciej Los 28-Feb-18 7:41am    
Wow!
It's very interesting statement: "All process goes fine", especially when you wrote in your question: "Also lots of "reference missing" errors occur"...
First thought: NuGet packet is not installed properly, but seems you don't need our help, because you don't want to share details.
phil.o 28-Feb-18 8:21am    
Being rude to people actually trying to help you will lead you nowhere near any solution.
Sudhir Dehade 1-Mar-18 6:32am    
I am not being rude.. It was a question that if you used it or not??

1 solution

Please, refer this:
Fanda's development blog: Npgsql with Entity Framework 6[^]
PostgreSQL and Entity Framework 6 Code First – Learning to Code[^]

Quote:
Because Npgsql doesn't support schema creation, you must create database manually and you can use this line to skip schema migrations and creation/updates.
 
Share this answer
 
v3
Comments
Sudhir Dehade 28-Feb-18 7:52am    
Thank You.. !
Maciej Los 28-Feb-18 7:53am    
You're very welcome.
BTW: you should accept my answer as a solution (green button), if it helped you to solve your problem.
Sudhir Dehade 28-Feb-18 8:10am    
My problem still not solved, the blog you suggested I have done all that before, but I am unable to get "why .edmx diagram is not generating??"....
As that diagram is not generated when I build the solution I get errors like
"Error 6004: The table 'DBName.public.TableName' is referenced by a relationship, but cannot be found. [SolutionName] [Path of EDMX file]."
No classes present in ".tt" file..
Sudhir Dehade 28-Feb-18 8:25am    
I have existing database...
" you can use this line to skip schema migrations and creation/updates. " what do you mean by this??
phil.o 28-Feb-18 8:26am    
It appears code-first approach is not supported with npgsql.
You have to use the database-first approach, apparently.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900