diff --git a/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderCommand.cs b/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderCommand.cs index 389d23119..3bcb2425b 100644 --- a/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderCommand.cs +++ b/src/Services/Ordering/Ordering.API/Application/Commands/CreateOrderCommand.cs @@ -5,6 +5,15 @@ using System.Runtime.Serialization; namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands { + // DDD and CQRS patterns comment: Note that it is recommened to implement immutable Commands + // In this case, its immutability is achieved by having all the setters as private + // plus only being able to update the data just once, when creating the object through its constructor. + // References on Immutable Commands: + // http://cqrs.nu/Faq + // https://docs.spine3.org/motivation/immutability.html + // http://blog.gauffin.org/2012/06/griffin-container-introducing-command-support/ + // https://msdn.microsoft.com/en-us/library/bb383979.aspx + [DataContract] public class CreateOrderCommand :IAsyncRequest