none
LINQ naming restrictions: is there a list of things to watch out for (avoid naming conflicts, etc...) RRS feed

  • Question

  •  

    Does LINQ have any naming restrictions, such as the .dbml can't be the same name as say a database table name, or ASP page name, maybe the Visual Studio project name, etc???

     

    I know I ran into an issue where an ASP.NET page name was the same name as one of the LINQ table names and that caused a whole mess of issues.  (I had a CustomerOrder.aspx page and one of the tables was of course CustomerOrder and well.. it was bad) Smile

     

    Anyway, is there a list of rules along those lines somewhere?

    Tuesday, April 15, 2008 8:06 PM

Answers

  • Name should not conflict with language keywords but SqlMetal and the designer take care of that for you.

    I am not aware of any other restrictions.

    What error were you getting with the ASP.NET page name and LINQ table name conflicting?

    As long as the class name in the ASP.NET page was not exactly the same name as the generated LINQ entity class name in the same namespace there should be no problem (I normally ensure my ASP.NET page class names end with Page in following the usual naming conventions for subclassing).

    [)amien
    Friday, June 6, 2008 9:18 AM
    Moderator