Added some comments about immutability Commands
This commit is contained in:
parent
ac58c12862
commit
a07bb18dca
@ -5,6 +5,15 @@ using System.Runtime.Serialization;
|
|||||||
|
|
||||||
namespace Microsoft.eShopOnContainers.Services.Ordering.API.Application.Commands
|
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]
|
[DataContract]
|
||||||
public class CreateOrderCommand
|
public class CreateOrderCommand
|
||||||
:IAsyncRequest<bool>
|
:IAsyncRequest<bool>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user