1

Hi I got a dbml file, that starts to add a 1 to the end of a EntitySet name Is there any way I can permanently fix this? If I change it in the designer file, its just returns when the file is updatet.

[global::System.Data.Linq.Mapping.AssociationAttribute(Name="Product_CompositeProduct", Storage="_CompositeProducts1", ThisKey="ProductNo", OtherKey="ParentID")]
        public EntitySet<CompositeProduct> CompositeProducts1
        {
            get
            {
                return this._CompositeProducts1;
            }
            set
            {
                this._CompositeProducts1.Assign(value);
            }
        }

I could just change the rest of my code, but I don't like to have 1 in the name.

Gert Arnold
  • 105,341
  • 31
  • 202
  • 291
gulbaek
  • 2,481
  • 13
  • 44
  • 65

1 Answers1

0

It seems that you already have property called CompositeProducts, and that's why it adds 1 at the end of entity set. it will add 2 the next time.

J.W.
  • 17,991
  • 7
  • 43
  • 76
  • Where can I check this? when I open the Db.dbml file visually I can only find 1 instance of the CompositeProduct, maybe an error in the Db.dbml.layout file? – gulbaek May 12 '11 at 15:11
  • 1
    Got it workin, by opening Db.dbml in a xml editor, and renamed it. Can also confirm that there are only 1 instance. Though it is working now, I think is only a question of time before it happens again. So a permanent fix would be nice. – gulbaek May 12 '11 at 15:41
  • Is that possible that you are connecting to a different database now. For example, you generated the dbml based on db on sqlserver1 , and then you connect to a db on sqlsever2. – J.W. May 12 '11 at 17:53
  • J.W At one point it was connected to another sqlserver to solve a speed problem, might be the cause. But at the moment it look like its fixed with xml editing DB-dbml – gulbaek May 14 '11 at 08:01