public static OrderIdentifier Parse(string s) { if (SolidCode.TryParseGuid(s, Prefix, out var guid)) { return(new OrderIdentifier(guid)); } throw new Exception("Invalid id"); }
public static OrderLineIdentifier Parse(string id) { if (SolidCode.TryParseUInt(id, Prefix, out var value)) { return(new OrderLineIdentifier(value)); } throw new Exception($"Cannot parse id {id}"); }