Skip to content

Field not being saved #2240

Answered by mysticmind
PeterKneale asked this question in General
Discussion options

You must be logged in to vote

With ref. to discussion in Gitter, the following was suggested as a solution:

A way to deal with that is to have a public getter/setter combo of IEnumerable<T> that delegates to the internal list. The whole "persistence ignorance" thing just doesn't work. Either you have to make compromises in your object structure for persistence, or use a separate domain model type for business logic than you use for persistence.

use public IEnumerable<ValueObject> List => _list;, this is purely for persistence and reload of data to the private field.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by mysticmind
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #2238 on May 24, 2022 13:10.