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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T17:56:35+00:00 2026-05-22T17:56:35+00:00

I could use some help understanding my domain model a bit and making sure

  • 0

I could use some help understanding my domain model a bit and making sure I am approaching the design correctly.

I have an aggregate root called Department. The Department object has several child value types that help define the business notion of a ‘department.’ In my UI users can list, create, edit and delete Department objects.

I have another aggregate root called Project. A Project has several child value types but also has a relationship to a Department in that each Project is ‘owned’ by a department. Projects can be created, edited, deleted, etc. and doing so has no impact on the department whereas removing a Department also removes any projects it owns.

My UI will display a list of Projects based on the departments the current user is authorized to access. They may be able to access more than one department. When displayed as both a list item as well as in detail, I need to show the Department logo with the Project.

My first thought was the Project was an aggregate root with a simple DepartmentID property that could be used to ‘lookup’ the Department. But now I’m starting to think that I really only have one aggregate root: Department.

What do you think?

UPDATE

I don’t know if it is key to the discussion or changes anything but the following thought occurred to me after reading the first couple of answers.

Department appears to have two contexts:

  1. As a stand-alone entity that
    supports modification.
  2. As a child of a Project in which
    case is contains read-only data and
    no behavior.

This makes me think that I should have two ‘objects’ in my model, an aggregate root for case #1 and a value type for case #2. Am I on the right track?

  • 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-05-22T17:56:36+00:00Added an answer on May 22, 2026 at 5:56 pm

    Since the Project can’t exist without a Department it’s probably not an Aggregate Root. From your description it sounds like you only have one AR – the Department, which you use to manage the projects inside it.

    If your behavior is mostly CRUD, i would not recommend building a full blown domain model for it since there are probably simpler approaches you can take.

    UPDATE
    As you mention, you might have 2 bounded contexts here. One where the Department is an AR and the Projects are entities of this AR. In this context you would perform operations on your Departments. In a second BC your Project could be the AR and the Departments could be entities or VOs. This would allow you to work directly with projects.

    I would also recommend going over this with your domain expert and see if these concepts fit well in your UL, or maybe search for some missing concept that can clarify your model. I would especially look for a concept that might link projects to departments.

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

Sidebar

Related Questions

I am pretty new to php and could sure use some help understanding how
We're having a small issue and could use some help - we have the
I have a piece of code here that i really could use some help
I'm just starting to learn T-SQL and could use some help in understanding what's
I made a big oops, and could use some help undoing it. We have
Nowadays, I'm exploring C# Expression APIs. So I could use some help understanding how
I need some help understanding how 32 bit applications use memory on a 64
I could use some help writing a regular expression. In my Django application, users
I could use some help creating an XSL template that will take a string
I am getting the following error and could use some help resolving it. Anyone

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.