Click here to Skip to main content
15,896,477 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi all,
i am using .net framework 3.5. in that i have added my database tables.and edmx diagram has been generated.
but the columns which has foreign key relationship are not showing in corresponding table in edmx diagram.but it is showing under navigation properties tab.
and if i see in model browser the columns are available.i am not getting why it is displaying like that.
moreover, when i want to pass a value to that corresponding column from businesslibrary i am getting an error that object reference is not set to an instance of an object.
i didn't add any entityframework dll to that project.because i have taken 3.5 framework and in that we already have system.data.entity dll.so i am using that.
so how can i pass values to that columns ,should i any dll again ,plz help me solve this....??
Posted
Updated 8-Apr-16 6:26am
Comments
virusstorm 12-Jun-15 13:58pm    
First, with the relationship now showing, can you clarify that a little bit or provide some code to show what is missing?

Second, you will need the EntityFramework.dll added to the other project. There are extensions to the System.Data.Entity.dll in that library that Entity Framework needs.

while creating a edmx diagram please check a box with option :"show foreign key relationship" this works for me i hope it will help you
 
Share this answer
 
Also ensure that existing table are associated with the same database. This might be an issue if you have modified the connection string (for ex. In web.config, if applicable) or if you have edited EDMX related files by hand.

In my case, I was using Devart but it might apply to you also.

I suppose that you have already ensure that the database itself is properly defined.

One more thing, you might try is to create a new EDMX file and see if you still have the problem.
 
Share this answer
 

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