What should I name my business classes given that LINQ data classes takes all table names?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Ronald S. Cook

    What should I name my business classes given that LINQ data classes takes all table names?

    So I have a table "Employee" and wish to have a business class "Employee".
    This was possible before LINQ. But now that I am generating a .dbml for the
    LINQ DataContext, it "takes over" those names for its classes.

    I'd hate to have to name my business classes "EmployeeCl ass" or some other
    non-ideal convention.

    Any thoughts?

    Thanks,
    Ron




  • =?ISO-8859-1?Q?Fernando_G=F3mez?=

    #2
    Re: What should I name my business classes given that LINQ data classestakes all table names?

    Ronald S. Cook wrote:
    So I have a table "Employee" and wish to have a business class
    "Employee". This was possible before LINQ. But now that I am generating
    a .dbml for the LINQ DataContext, it "takes over" those names for its
    classes.
    >
    I'd hate to have to name my business classes "EmployeeCl ass" or some
    other non-ideal convention.
    >
    Any thoughts?
    >
    Thanks,
    Ron
    I usually like naming my data layer classes prefixed with Data, like
    DataEmployee, DataCustomer, DataOrder, etc.

    Comment

    • =?ISO-8859-1?Q?Arne_Vajh=F8j?=

      #3
      Re: What should I name my business classes given that LINQ data classestakes all table names?

      Ronald S. Cook wrote:
      So I have a table "Employee" and wish to have a business class
      "Employee". This was possible before LINQ. But now that I am generating
      a .dbml for the LINQ DataContext, it "takes over" those names for its
      classes.
      >
      I'd hate to have to name my business classes "EmployeeCl ass" or some
      other non-ideal convention.
      XxxxClass is not a good class name,

      Only distinguishing by name space is not a good approach either.

      If you write the LINQ stuff yourself then you can choose a class name
      different from the table name, but let us focus on the problem
      as described.

      There should be some difference between the two classes and
      that difference should be reflected in the name.

      EmployeeRole maybe.

      Arne

      Comment

      Working...