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 8780539
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 13, 20262026-06-13T20:04:45+00:00 2026-06-13T20:04:45+00:00

I want to create an entity that has two constants. I would prefer the

  • 0

I want to create an entity that has two constants. I would prefer the declaration to be in the entity declaration and not in the architecture, but I need to use the constants in the architecture.

  • If I define them in the entity declaration, will they be known in the architecture?
  • When I use the entity as a component, will I need to redefine the constants again, or could I write only the ports?
  • Any other differences that I should be aware of?
  • 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-13T20:04:46+00:00Added an answer on June 13, 2026 at 8:04 pm

    To answer your questions:

    1. Constants in the entity are available in the architecture.
    2. A component does not have (or need) constants.
    3. A constant in the entity applies to all architectures, not just one of them.

    But as Charles said in his answer, you may want to consider using generics instead of constants if they are actually “constants” that you want to sometimes change.

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

Sidebar

Related Questions

I use Entity Framework code-first. DataBaseName - I want to create a database in
I've got two types of contact entity. One that just has an email address
I want to create a one to one mapping between the Entity Customer and
I create a new entity, store it the first time and then want to
I want create wordpress website into which I want create user management... That means
i want create a custom json data from the mssql 2008 results so that
I am writing an application that has typical two entities: User and UserGroup. The
I have a Core Data entity, OrderItem that has a to-many relationship to another
My model has an entity Filter and an entity Color. I want to have
I have a complex entity ( Message ) that has quite a hefty constructor

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.