linq to sql templates v2.6 error with eponymous columns

Posts   
 
    
Posts: 27
Joined: 16-Jul-2007
# Posted on: 15-Jul-2008 22:11:20   

table:message column:message

Error 10 'Message': member names cannot be the same as their enclosing type D:\Projects\xxxx\EntityClasses\Message.cs 166 24 xxxxx.Data.L2S

Walaa avatar
Walaa
Support Team
Posts: 14993
Joined: 21-Aug-2005
# Posted on: 16-Jul-2008 11:53:43   

table:message column:message

You can't have a property in a class with the same name of the class, this will lead to ambiguities.

Please rename either the column or the table. If you don't want to alter the schema, you can rename any of them in the designer.