Reputation: 21928
i am having a small problem here.
The table which dbml (LinqToSql designer) is using has columns (Foreign keys), for which it generates two objectsfor the coressponding Blogs table (1:1 association) in DB lmost same,
like
Table Authors: AuthorID INT, Name varchar(20), BlogID INT
And
TABLE BLOG:
BlogID INT, Name varchar(MAX)
It appears in intellisense as well. I have even deleted and Added a new dbml, but still same results. What is going on ?
Upvotes: 0
Views: 185
Reputation: 50728
The only time I've had that happen is when I have two FK references in the database (I have multiple columns pointing to the same table via an FK), either I did this intentionally or I had two references by accident.
HTH.
Upvotes: 2
Reputation: 48402
The only time I've seen L2S code generator do this is when I've had two tables with the same name but contained in different schema's. I suspect this is what is happening to you. BTW, we wrote our own code generator to deal with this, because L2S doesn't handle tables in different schema's very well.
Upvotes: 1