tags:

views:

31

answers:

2

I have been going round and round with a linq to sql file while using svn for quite some time. The latest is that my dbml file shows as having an error which states that

An item named "Customer" already exists. Please choose a different name.

And then it repeats that again. In fact, it says it for almost every object. What is my fix? I have tried renaming the one named Customer, but that didn't fix it. I don't know where to go to fix this. I went to the .dbml file and don't see any duplication, and I went to the .dbml.layout file and didn't see any duplication there either.

A: 

I don't believe you can have a member name with the same name as the class it belongs to, as in:

public class Customer
{
   public string Customer { get; set; }
   ...
}

Check your entity.

Neil T.
A: 

Figured it out. Somehow there were duplicate associations. The part that confused me was that it looked like it was pointing to an object and didn't look like it was pointing to the association.

Anthony Potts