private Subscription(EmployeesRange employeesRange, decimal price) { EnsureArg.IsNotNull(employeesRange); EnsureArg.IsGt(price, 0); EmployeesRange = employeesRange; Price = price; }
public static Result <EmployeesRange> Create(int inferiorLimit, int superiorLimit) { if (superiorLimit <= inferiorLimit) { return(Result.Fail <EmployeesRange>("Superior limit should be higher than inferior limit!")); } var range = new EmployeesRange(inferiorLimit, superiorLimit); return(Result.Ok(range)); }
public static Subscription Create(EmployeesRange range, decimal price) { return(new Subscription(range, price)); }