/// <summary> /// Initializes a new instance of the <see cref="PerformanceReviewValidator"/> class. /// </summary> public PerformanceReviewValidator(IPerformanceReviewManager performanceReviewManager, IEmployeeManager employeeManager) { _performanceReviewManager = Check.NotNull(performanceReviewManager, nameof(performanceReviewManager)); _employeeManager = Check.NotNull(employeeManager, nameof(employeeManager)); Property(x => x.EmployeeId).Mandatory(); Property(x => x.Date).Mandatory().CompareValue(CompareOperator.LessThanEqual, _ => ExecutionContext.Current.Timestamp, _ => "today"); Property(x => x.Notes).String(4000); Property(x => x.Reviewer).Mandatory().String(256); Property(x => x.Outcome).Mandatory().IsValid(); }
public PerformanceReviewController(IPerformanceReviewManager manager) { _manager = Check.NotNull(manager, nameof(manager)); PerformanceReviewControllerCtor(); }