public CustomerId(string value) { if (value == string.Empty) { InvalidCustomerEmpty.FromEmpty(); } this.value = value; }
public CustomerName(string value) { if (value == string.Empty) { InvalidCustomerEmpty.FromEmpty(); } if (value.Length > MAX_LENGTH) { InvalidCustomerLength.FromLength(); } this.value = value; }