Skip to content

Instantly share code, notes, and snippets.

@dcomartin
Last active Oct 20, 2021
Embed
What would you like to do?
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