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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T13:15:02+00:00 2026-05-11T13:15:02+00:00

Recently finished reading Eric Evans Domain Driven Design (very informative, very enjoyable) however come

  • 0

Recently finished reading Eric Evans Domain Driven Design (very informative, very enjoyable) however come to first major project since completing the book and got the issue how to handle the domain model save?

I appreciate the use of services / repositories and how they can aid the model but how would they handle the model save?

My previous domain model saves would follow the following method call structure;

ParentClass.Save {

ParentClassDB.Save

ChildObject1.Save

       ChildObject1DB.Save 

ChildObject2.Save

       ChildObject2DB.Save     etc etc  

}

Does the service take control of calling the appropiate save routines on the child objects?

  • 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. 2026-05-11T13:15:03+00:00Added an answer on May 11, 2026 at 1:15 pm

    In DDD, the domain entity doesn’t take care of its persistence. You should not have a Save() method on it, ideally.

    Your repository will have such a Save method, that takes an entity instance in parameter:

    public class PersonRepository {    //...     public void Save(Person person)    {       this.dataContext.Save(person);    }     //... } 

    Depending on your stack, an ORM will handle the object saving, or you will end by constructing a query to save the person, or you will populate stored procedure parameters with from your instance values, etc.

    If I understood correctly what you did, it may be necessary to move the persistence logic you put in the domain entities elsewhere, probably in repositories, or in the DAL used by your repositories.

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

Sidebar

Related Questions

I just recently finished reading Secure Coding in C and C++ by Brian Seacord,
I recently forced myself to study C++ and I just finished reading the book
I'm very new to Ruby. I've recently finished writing a simple script, which uses
Recently I have finished my first Iphone app and it works grate.... except for
I recently finished a university course in C. Therefore I lack experience, of course.
We've recently finished development of a web application that works as expected. When we
Recently Jeff has posted regarding his trouble with database deadlocks related to reading. Multiversion
I've been doing some reading about continuous integration recently and there is a scenario
I recently finished a class that we're using to tie Access to some WCF
Recently I just finished a simple Facebook Air application, and some of my friends

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.