public static ValidationResult <Record> Create(string productName, int amount) { return(ReadableText.Create(productName) .Zip(Int1To20.Create(amount), (txt, integer) => new Record(txt, integer))); }
private Record(ReadableText name, Int1To20 amount) { ProductName = name; Amount = amount; }