Click here to Skip to main content
14,111,188 members
Rate this:
Please Sign up or sign in to vote.
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
Updated 28-Feb-18 1:50am
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
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

Rate this: bad
Please Sign up or sign in to vote.

Solution 1

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

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.
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.
Sudhir Dehade 28-Feb-18 8:37am
There are 4 option in "Choose Model Contents" Wizard
1. EF Designer from DB.
2. Empty EF designer model
3. Empty Code First Model
4. Code First from DB

Which I suppose to select...???
And Thank you for your replies till now...

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy | Cookies | Terms of Service
Web01 | 2.8.190518.1 | Last Updated 28 Feb 2018
Copyright © CodeProject, 1999-2019
All Rights Reserved.
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100