Skip to content

Commit a07bb18

Browse files
Added some comments about immutability Commands
1 parent ac58c12 commit a07bb18

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderCommand.cs

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@
55

66
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands
77
{
8+
// DDD and CQRS patterns comment: Note that it is recommened to implement immutable Commands
9+
// In this case, its immutability is achieved by having all the setters as private
10+
// plus only being able to update the data just once, when creating the object through its constructor.
11+
// References on Immutable Commands:
12+
// http://cqrs.nu/Faq
13+
// https://docs.spine3.org/motivation/immutability.html
14+
// http://blog.gauffin.org/2012/06/griffin-container-introducing-command-support/
15+
// https://msdn.microsoft.com/en-us/library/bb383979.aspx
16+
817
[DataContract]
918
public class CreateOrderCommand
1019
:IAsyncRequest<bool>

0 commit comments

Comments
 (0)