/// <summary> /// Validates an assignment swap view model /// </summary> /// <param name="swapModel">The swap model to validate</param> public static void ValidateAssignmentSwapVM(AddAssignmentGroupSwapViewModel swapModel) { // Validating base validity APIValidation.Validate(swapModel); // Assignment group IDs cannot be the same if (swapModel.SwapAssignmentGroupID == swapModel.BaseAssignmentGroupID) { throw new CoursesAPIException(ErrorCodes.IDENTICAL_GROUP_IDS); } }
/// <summary> /// Validates an assignment /// </summary> /// <param name="groupModel"></param> public static void ValidateAssignmentVM(this AddAssignmentViewModel groupModel) { // Validing the model APIValidation.Validate(groupModel); }