private SlotAssignment AssignAdjudicatorSlots(SlotAssignment assignment, int adjudicatorSlots, User user) { if (assignment.AdjucatorsGranted != adjudicatorSlots) { assignment.AdjucatorsGranted = adjudicatorSlots; assignment.UpdateTrackingData(user); unitOfWork.GetRepository<SlotAssignment>().Update(assignment); unitOfWork.Save(); } return assignment; }
private SlotAssignment AssignTeamSlots(SlotAssignment assignment, int teamSlots, User user) { if (assignment.TeamsGranted != teamSlots) { assignment.TeamsGranted = teamSlots; assignment.UpdateTrackingData(user); unitOfWork.GetRepository<SlotAssignment>().Update(assignment); unitOfWork.Save(); } return assignment; }