public void FinalizeLeave(int leaveId) { LeaveEntry leave = this.repository.FindLeaveById(leaveId); leave.FinalizeLeave(); this.repository.UpdateLeave(leave); }
public void CreateLeave(LeaveInputModel input) { var leaveType = this.leaveTypeFactory.Make(input.LeaveType); var employee = this.repository.FindEmployeeById(input.EmployeeId); var leave = new LeaveEntry(employee, input.StartDate, input.EndDate, leaveType); this.repository.InsertLeave(leave); }