SPMetal is creating duplicate entities when I attempt to generate code with the following conditions.
I have a custom content type [Person] that inherits from [Contact].
I have created a list instance named [Persons] and deployed it to the server.
When I run SPMetal with the following parameters.xml file I get two classes generated
[Parameters.xml]
<List Name="Persons">
<ContentType Name="Person" Class="Person" />
</List>
[GeneratedCode.cs]
public partial class Person : Contact
public partial class Person0 : Person
Am I doing something wrong? Is there a way to simply generate one class per content type?
UPDATE:
I have determined that SPMetal is generating two classes: [Person] and [Person0] because Person is a content type but it's fields were copied to the list definition schema file when I used it in a list definition. I verified this by removing the content type, but leaving the list, SPMetal only generates one instance of the person class in this case.
Not sure where I'm going from here but wanted to update the question in case someone else was following along.