Skip to content

Commit 7fb1d2a

Browse files
authored
Fix typo in net-core-microservice-domain-model.md (#20644)
1 parent 62b913d commit 7fb1d2a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docs/architecture/microservices/microservice-ddd-cqrs-patterns/net-core-microservice-domain-model.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@ In addition, the new OrderItem(params) operation will also be controlled and per
149149

150150
When you use Entity Framework Core 1.1 or later, a DDD entity can be better expressed because it allows [mapping to fields](https://docs.microsoft.com/ef/core/modeling/backing-field) in addition to properties. This is useful when protecting collections of child entities or value objects. With this enhancement, you can use simple private fields instead of properties and you can implement any update to the field collection in public methods and provide read-only access through the AsReadOnly method.
151151

152-
In DDD, you want to update the entity only through methods in the entity (or the constructor) in order to control any invariant and the consistency of the data, so properties are defined only with a get accessor. The properties are backed by private fields. Private members can only be accessed from within the class. However, there one exception: EF Core needs to set these fields as well (so it can return the object with the proper values).
152+
In DDD, you want to update the entity only through methods in the entity (or the constructor) in order to control any invariant and the consistency of the data, so properties are defined only with a get accessor. The properties are backed by private fields. Private members can only be accessed from within the class. However, there is one exception: EF Core needs to set these fields as well (so it can return the object with the proper values).
153153

154154
### Map properties with only get accessors to the fields in the database table
155155

0 commit comments

Comments
 (0)