views:

80

answers:

2

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)

  • Blog { string name; int ID}
  • Blog1 { string name; int ID}

It appears in intellisense as well. I have even deleted and Added a new dbml, but still same results. What is going on ?

+1  A: 

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.

Randy Minder
+1  A: 

Hey,

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.

Brian