0

I'd be happy to give you more info if you need, just ask for it.

I have in my database a table of articles, a table of tags and a link table. The article table has values like Id, Subject etc etc, the tags only have Id and Tag. The link has TagId and ArticleId.

The problem is that when I drag drop the link-table nothing happens! This all worked before I decided to rename my column in the tables from "ID" to "Id" to correct spelling.

Thanks in advance!

3
  • Rename them back, report your findings, and post your schema please. Commented Apr 8, 2010 at 22:00
  • for quick reference I would always generalize your attributes to adhere to your tables, so instead of id i would say articleid, so whenever I use that as a foreign key i know what is referenced back. I'd rename your tables lowercase. Commented Apr 8, 2010 at 22:05
  • Good idea, ill rename the values. However the tables are named lowercase(didn't even include the table names in my posT) Commented Apr 9, 2010 at 14:51

2 Answers 2

1

The problem was that one of my foreign cas was set to nullable. Unsetting it from nullable made it work!

Sign up to request clarification or add additional context in comments.

2 Comments

Interesting - great that you found solution
@Sergey however seems like restarting visual studio did the charm as well
0

Please check that all tables has PK on Id column. You are saying that 'The link has TagId and ArticleId.' - For LINQ you need to have single PK - so you need to create fake Primary Key ID (maybe int identity)

3 Comments

Indeed they do. The link table has a combined PK of TagId and ArticleId
Do not remember exactly, but COMBINED PK is somthing which worth to avoid in LINQ. for example, here this is accepted answer - stackoverflow.com/questions/647146/…
The problem is that I have other combined PK without any problems using LINQ

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.