public Shift ToShift() { return(new Shift { Bedtime = Bedtime, EndTime = LeaveTime, StartTime = StartTime, HourlyRates = HourlyRates.FromRates(HourlyRate, HourlyRateBetweenBedtimeAndMidnight, HourlyRateAfterMidnight) }); }
private static Sitter CreateSitter(AddBabySitterArgs args) { return(new Sitter { FirstName = args.FirstName, LastName = args.LastName, HourlyRates = HourlyRates.FromRates( args.HourlyRate.GetValueOrDefault(HourlyRates.StandardHourlyRate), args.HourlyRateBetweenBedtimeAndMidnight.GetValueOrDefault(HourlyRates.StandardHourlyRateBetweenBedtimeAndMidnight), args.HourlyRateAfterMidnight.GetValueOrDefault(HourlyRates.StandardHourlyRateAfterMidnight)) }); }