Skip to main content
added 3 characters in body
Source Link
Gulshan
  • 9.5k
  • 10
  • 60
  • 89

I think, domain layer should know/dictate if some data should be saved or not, unless nothing/everything is being saved. But it should not know how the data is being saved.

Other than the repository interface within the domain layer, another way to achieve that is marking data for beingto be saved. The marking can be done using a flag property or a generic wrapper class. TheThen the application layer will check the mark and initiate the needful to save/persist the data.

I think, domain layer should know/dictate if some data should be saved or not, unless nothing/everything is being saved. But it should not know how the data is being saved.

Other than the repository interface within the domain layer, another way to achieve that is marking data for being saved. The marking can be done using flag property or a generic wrapper class. The application layer will check the mark and initiate the needful to save/persist the data.

I think, domain layer should know/dictate if some data should be saved or not, unless nothing/everything is being saved. But it should not know how the data is being saved.

Other than the repository interface within the domain layer, another way to achieve that is marking data to be saved. The marking can be done using a flag property or a generic wrapper class. Then the application layer will check the mark and initiate the needful to save/persist the data.

Source Link
Gulshan
  • 9.5k
  • 10
  • 60
  • 89

I think, domain layer should know/dictate if some data should be saved or not, unless nothing/everything is being saved. But it should not know how the data is being saved.

Other than the repository interface within the domain layer, another way to achieve that is marking data for being saved. The marking can be done using flag property or a generic wrapper class. The application layer will check the mark and initiate the needful to save/persist the data.