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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 20, 20262026-05-20T20:39:50+00:00 2026-05-20T20:39:50+00:00

I have Person class which is root of its aggregate, this aggregate also contains

  • 0

I have Person class which is root of its aggregate, this aggregate also contains country and state province as vo.

{Person, Country, StateProvince} – > Person is root aggregate.

//
Public Person(string name, string country, state province,{other params}){}

// But now i am facing problem in UI, how will i populate Dropdown for Country and Stateprovince, through person because it is root aggregate, but i don’t want any person’s assigned Country or Stateprovince but i want list of all countries and their Stateprovince, so that user choose one from them

Do i manually create table for country and stateprovince and fill them with all values manually.If yes, then how will i get values from those tables in ddd .

  • 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-20T20:39:51+00:00Added an answer on May 20, 2026 at 8:39 pm

    Your model is trying to tell you something.

    Country and StateProvince are probably not part of the Person Aggregate.

    Remember the very handy “delete test” for an aggregate, ask if I delete this person do I also delete their country and StateProvince? I live in Canada, and you remove me from your system are you also going to delete the country Canada from your system as well?

    No, you would not. You have two separate aggregates here Person and Location which would contain the Aggregate of {Country, StateProvince} If you delete a country you would very likely also delete all the states or provinces contained within it as well.

    Just because Person references a class or has-a class doesn’t make all the references part of that aggregate. Location is very common aggregate in many systems and regularly stands on it’s own.

    You should have a Person Repository that utilizes a LocationRepository and have the UI directly call the LocationRepository to obtain Location Aggregates.

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

Sidebar

Related Questions

I have a Person class. A person class contains a collection of Friends (also
I have a Case class which exposes a Person object as follows: public class
This should be a fundamental C# question. Suppose I have a Person class which
I have a class Person which contains String firstName, lastName . I want to
I have a Person class which has a String collection of aliases representing additional
Say I have a class which represents a person, a variable within that class
I have a model in my rails application which is class Person < ActiveRecord::Base
I have a dll in C# which returns a class object. DLL code: Person.cs:
I have a Person Class and based on some help I received in this
Example-I have a person class Public Class Person Private _fname As String Public Property

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.