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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T16:34:38+00:00 2026-05-13T16:34:38+00:00

My domain entities are lined up like a tree: Root – Child 1 —

  • 0

My domain entities are lined up like a tree:

Root
– Child 1
— Child 1.1
— Child 1.2
– Child 2
— Child 2.1
— Child 2.2

We ended up with 2 (rather strong) opinions on how a repository should be designed around these domain objects:

Opinion 1:
I need 2 repositories Child1Repository & Child2Repository which gets managed by a RootFacade/RootManager class to call the appropriate method on the repository. The 2 child repositories handle only the DAL operations while the RootFacade is the BLL. The RootFacade exposes DTO’s to the application while internally all the 3 repositories use domain objects

Opinion 2:
I need 1 repository RootRepository which handles everything (BLL + DAL). The repository exposes DTO’s while internally it works with the domain objects

I would like to have some perspective on these 2 points & which is really the way to go about for a repository implementation.

Thanks for all the help

  • 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-13T16:34:39+00:00Added an answer on May 13, 2026 at 4:34 pm

    Classes shouldn’t take on more responsibility than they need to, and it definitely sounds like the approach of a RootRepository is the wrong way to go here. It absorbs too much complexity and is responsible for too many entities. Of the two options you presented, the first is the better choice: have more repositories that are each responsible for their own corner of your domain.

    However, that said, it’s not clear to me why you have a RootManager at all. I would much rather have a series of DomainObjectRepositories which each managed their own business logic internally, and only exposed the relevant public operations, then defer actual database operations to a data-access object DomainObjectDao. Having an omniscient all-the-biz-logic class is a monstrous code smell, and smacks of enterprisey overkill in this particular case.

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

Sidebar

Related Questions

Domain Model I am working on has root aggregate and child entities. Something like
Should Domain Entities be exposed as Interfaces or as Plain Objects ? The User
We have bunch of Domain Entities which should be rendered to an html format,
I have a view model like this: public class EditVM { public Media.Domain.Entities.Movie Movie
For domain entities, should property names be prefaced with the entity name? I.E. my
I'm trying to eager load some child entities like so: _context.Sites.Where(x => x.ID ==
I have my domain entities. These entities are all together in a class library.
How could I map my Linq-to-Sql generated entities (DTO’s) to my domain entities? The
Is it possible to use the @Html.EditorForModel() method but not pollute my Domain entities
Given systems A and B, how can i reference domain entities from system A

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.