Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8421709
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 10, 20262026-06-10T03:13:18+00:00 2026-06-10T03:13:18+00:00

For example, is this a good practice? private SalesOrder salesOrder; public SalesOrder SalesOrder {

  • 0

For example, is this a good practice?

private SalesOrder salesOrder;

public SalesOrder SalesOrder
{
    get { return salesOrder; }
    set { salesOrder = value; }
}

Or should I always append the object property with Object or BusinessObject to distinguish the property type from the property itself:

public SalesOrder SalesOrderBusinessObject
{
    get { return salesOrder; }
    set { salesOrder = value; }
}

Does it matter if the property is part of a web page or an object?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-10T03:13:19+00:00Added an answer on June 10, 2026 at 3:13 am

    The latter is horrible. It’s modelling something that has a sales order, which in turn is modelled by an object – not modelling something that has a sales order object.

    “BusinessObject” should only be the name of something in your code, if you’re writing a tool for developers to help them deal with business objects.

    The former is often good.

    It’s not good if there could be more than one SalesOrder – even if one is the “main” one, you’re introducing confusion. However a SalesOrders property that was an enumerable or collection of SalesOrder objects is good (when the English-language plural isn’t of the singular + ‘s’ form, use the real plural rather than just adding s, unless it’s a case where the English plural is the same as the singular.

    It’s less than great when everything else is sales-related. E.g. this is horrible:

    public class Sale
    {
      public SalesOrder SalesOrder{get;set;}
      public SalesReference SalesReference{get;set;}
      public decimal SalesValue{get;set;}
      public string SalesCurrency{get;set;}
    }
    

    In this case I’d cut the “Sales” from each property name, but not (necessarily) from the class names.

    However, this is a case where it’s nicer:

    public class Sale
    {
      public SalesOrder SalesOrder{get;set;}
      public StockOrder StockOrder{get;set;}
    }
    

    In all, the way to approach it is:

    1. What is the best name for what this class does, that differentiates it from what other classes do (and hence, no “object”, “business object”, “entity” or similar unless that really stands out as being particularly relevant in the given case).
    2. What is the best name for what the property reflects, that differentiates it from other properties.

    If they end up giving the same name in a particular case, then that’s fine (unless it’s a nested class, when it’s ambiguous and illegal). If they end up giving a different name, then fine too.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I currently reference HttpContext in my models. Is this good practice? Should I just
So I can't seem to find a good example of this anywhere. I found
A good example is the SO star on the left hand side of this
Sorry if this has been asked before, but I couldn't find a good example
Ok.. So probably an example is a good way to explain this problem So
Is this a good practice and is there anything I need to look out
I've always wondered, if it's good or bad practice to define trivial method twice,
Is it good practice to use the private field, or the property, when writing
IS this straightforward? Does any one have any good examples? All my google searches
Example: /** * This function will determine whether or not one string starts with

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.