Friday, March 4, 2011

Linq to SQL: How do I stop the auto generated object name from being renamed?

In visual studio 2008, when I drag a database table into my dbml screen, any tables that end with the letter s automatcially get the s removed from the dbml object. Is there any way to disable this?

Also, the collection of rows also gets an s appended to the collection property name. Is there a way to change that as well?

Thanks

From stackoverflow
  • You need to disable the Pluralize Table Names for the LINQ to SQL designer.

    To do this navigate to Tools -> Options -> Database Tools -> O/R Designer and change the Pluralization of names to false.

    Then you will need to recompile your project and it should address the naming

0 comments:

Post a Comment