Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Last active October 20, 2021 21:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dcomartin/27f6b9c0aea4ffdfb784e839a7a21d3f to your computer and use it in GitHub Desktop.
Save dcomartin/27f6b9c0aea4ffdfb784e839a7a21d3f to your computer and use it in GitHub Desktop.
using System;
using ValueObject;
namespace ValueObject2
{
public record PlaceOrderCommand(Guid CustomerId, string ProductSku, int Quantity, string CurrencySymbol)
{
public PlaceOrderCommand(Guid customerId, string productSku)
: this(customerId, productSku, 1, Currency.USD.ToString()) { }
public PlaceOrderCommand(Guid customerId, string productSku, string currency)
: this(customerId, productSku, 1, currency) { }
public PlaceOrderCommand(Guid customerId, string productSku, int quantity)
: this(customerId, productSku, quantity, Currency.USD.ToString()) { }
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment